@@ -66,13 +66,13 @@ pub const METADATA_HEADER: &[u8] = &[b'r', b'u', b's', b't', 0, 0, 0, METADATA_V
6666///
6767/// Metadata is effective a tree, encoded in post-order,
6868/// and with the root's position written next to the header.
69- /// That means every single `Lazy ` points to some previous
69+ /// That means every single `LazyValue ` points to some previous
7070/// location in the metadata and is part of a larger node.
7171///
72- /// The first `Lazy ` in a node is encoded as the backwards
72+ /// The first `LazyValue ` in a node is encoded as the backwards
7373/// distance from the position where the containing node
74- /// starts and where the `Lazy ` points to, while the rest
75- /// use the forward distance from the previous `Lazy `.
74+ /// starts and where the `LazyValue ` points to, while the rest
75+ /// use the forward distance from the previous `LazyValue `.
7676/// Distances start at 1, as 0-byte nodes are invalid.
7777/// Also invalid are nodes being referred in a different
7878/// order than they were encoded in.
@@ -94,12 +94,12 @@ impl<T> LazyValue<T> {
9494
9595/// A list of lazily-decoded values.
9696///
97- /// Unlike `Lazy <Vec<T>>`, the length is encoded next to the
97+ /// Unlike `LazyValue <Vec<T>>`, the length is encoded next to the
9898/// position, not at the position, which means that the length
9999/// doesn't need to be known before encoding all the elements.
100100///
101101/// If the length is 0, no position is encoded, but otherwise,
102- /// the encoding is that of `Lazy `, with the distinction that
102+ /// the encoding is that of `LazyArray `, with the distinction that
103103/// the minimal distance the length of the sequence, i.e.
104104/// it's assumed there's no 0-byte element in the sequence.
105105struct LazyArray < T > {
@@ -167,17 +167,17 @@ impl<I, T> Clone for LazyTable<I, T> {
167167 }
168168}
169169
170- /// Encoding / decoding state for `Lazy`.
170+ /// Encoding / decoding state for `Lazy`s (`LazyValue`, `LazyArray`, and `LazyTable`) .
171171#[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
172172enum LazyState {
173173 /// Outside of a metadata node.
174174 NoNode ,
175175
176- /// Inside a metadata node, and before any `Lazy`.
176+ /// Inside a metadata node, and before any `Lazy`s .
177177 /// The position is that of the node itself.
178178 NodeStart ( NonZeroUsize ) ,
179179
180- /// Inside a metadata node, with a previous `Lazy`.
180+ /// Inside a metadata node, with a previous `Lazy`s .
181181 /// The position is where that previous `Lazy` would start.
182182 Previous ( NonZeroUsize ) ,
183183}
0 commit comments