From 694de0e16387e34b7cc9cf28c955a782cf4b9330 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 17 Jan 2023 13:34:08 +0000 Subject: [PATCH] netdoc-builder api: Change object multiplicity to 0 or 1 --- doc/dev/netdoc-builder.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/dev/netdoc-builder.md b/doc/dev/netdoc-builder.md index 1855bb4c0..30efc6622 100644 --- a/doc/dev/netdoc-builder.md +++ b/doc/dev/netdoc-builder.md @@ -22,7 +22,7 @@ pub(crate) struct NetdocEncoder { } // we need to accumulate these in pieces, and put them in doc later, -// because otherwise args and objects can't be specified in any order +// because otherwise args and object can't be specified in any order // and we'd need a typestate, and also there's the newline after the // args struct ItemEncoder<'n, K> { @@ -30,11 +30,11 @@ struct ItemEncoder<'n, K> { /// `None` after `drop`, or if an error occurred doc: Option<&'mut NetdocEncoder>, args: Vec, - /// Encoded form of the zero or more Objects + /// Encoded form of the zero or one Object /// /// Includes all necessary framing includng trailing newlines. - /// Empty if there are no objects. - objects: String, + /// Empty if there is no object. + object: String, } impl Drop for ItemEncoder<'_> { @@ -53,7 +53,7 @@ struct Cursor { impl NetdocEncoder { /// Adds an item to the being-built document /// - /// The item can be further extended with arguments or objects, + /// The item can be further extended with arguments or an object, /// using the returned `ItemEncoder`. // // Actually, we defer adding the item until `ItemEncoder` is dropped.