diff options
| author | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2020-05-01 21:40:10 +0200 |
|---|---|---|
| committer | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2020-05-01 21:40:10 +0200 |
| commit | ad460446c953a3ef009e12fc21b025000f144768 (patch) | |
| tree | cb2ae908c9bf4f4bed0b1af21edf14835d554536 | |
| parent | a91d64873f5b8daa43f0e82dedad7e2bc39e8fba (diff) | |
| download | rust-ad460446c953a3ef009e12fc21b025000f144768.tar.gz rust-ad460446c953a3ef009e12fc21b025000f144768.zip | |
doc: make Stack and StackElement a little pretty
Also, fix rustdoc warnings.
| -rw-r--r-- | src/libserialize/json.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index 7565bdeb409..496011b6947 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -1417,16 +1417,18 @@ enum ParserState { /// A Stack represents the current position of the parser in the logical /// structure of the JSON stream. -/// For example foo.bar[3].x +/// +/// An example is `foo.bar[3].x`. pub struct Stack { stack: Vec<InternalStackElement>, str_buffer: Vec<u8>, } /// StackElements compose a Stack. -/// For example, StackElement::Key("foo"), StackElement::Key("bar"), -/// StackElement::Index(3) and StackElement::Key("x") are the -/// StackElements compositing the stack that represents foo.bar[3].x +/// +/// As an example, `StackElement::Key("foo")`, `StackElement::Key("bar")`, +/// `StackElement::Index(3)`, and `StackElement::Key("x")` are the +/// StackElements compositing the stack that represents `foo.bar[3].x`. #[derive(PartialEq, Clone, Debug)] pub enum StackElement<'l> { Index(u32), |
