Skip to content

Commit 5747d1e

Browse files
authored
Rollup merge of #71767 - tshepang:stack-stuff, r=jonas-schievink
doc: make Stack and StackElement a little pretty Also, fix rustdoc warnings.
2 parents e96036f + 3406b53 commit 5747d1e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: src/libserialize/json.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -1417,16 +1417,18 @@ enum ParserState {
14171417

14181418
/// A Stack represents the current position of the parser in the logical
14191419
/// structure of the JSON stream.
1420-
/// For example foo.bar[3].x
1420+
///
1421+
/// An example is `foo.bar[3].x`.
14211422
pub struct Stack {
14221423
stack: Vec<InternalStackElement>,
14231424
str_buffer: Vec<u8>,
14241425
}
14251426

14261427
/// StackElements compose a Stack.
1427-
/// For example, StackElement::Key("foo"), StackElement::Key("bar"),
1428-
/// StackElement::Index(3) and StackElement::Key("x") are the
1429-
/// StackElements compositing the stack that represents foo.bar[3].x
1428+
///
1429+
/// As an example, `StackElement::Key("foo")`, `StackElement::Key("bar")`,
1430+
/// `StackElement::Index(3)`, and `StackElement::Key("x")` are the
1431+
/// StackElements composing the stack that represents `foo.bar[3].x`.
14301432
#[derive(PartialEq, Clone, Debug)]
14311433
pub enum StackElement<'l> {
14321434
Index(u32),

0 commit comments

Comments
 (0)