File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed
Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ pub use value::JsonValue::Null;
215215/// Result type used by this crate.
216216///
217217///
218- /// *Note:* Since 0.9.0 the old `JsonResult` type is depreacted . Always use
218+ /// *Note:* Since 0.9.0 the old `JsonResult` type is deprecated . Always use
219219/// `json::Result` instead.
220220pub type Result < T > = result:: Result < T , Error > ;
221221
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ pub struct Number {
3434 // A byte describing the sign and NaN-ness of the number.
3535 //
3636 // category == 0 (NEGATIVE constant) -> negative sign
37- // category == 1 (POSITIVE constnat ) -> positive sign
37+ // category == 1 (POSITIVE constant ) -> positive sign
3838 // category > 1 (matches NAN_MASK constant) -> NaN
3939 category : u8 ,
4040
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ static NULL: JsonValue = JsonValue::Null;
1616//
1717// Additionally this "randomizes" the keys a bit. Should the keys in an object
1818// be inserted in alphabetical order (an example of such a use case would be
19- // using an object as a store for entires by ids, where ids are sorted), this
19+ // using an object as a store for entries by ids, where ids are sorted), this
2020// will prevent the tree from being constructed in a way where the same branch
2121// of each node is always used, effectively producing linear lookup times. Bad!
2222//
@@ -149,7 +149,7 @@ impl Drop for Key {
149149}
150150
151151// Just like with `Drop`, `Clone` needs a custom implementation that accounts
152- // for the fact that key _can_ be separately heap allcated .
152+ // for the fact that key _can_ be separately heap allocated .
153153impl Clone for Key {
154154 fn clone ( & self ) -> Self {
155155 if self . len > KEY_BUF_LEN {
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ const DEPTH_LIMIT: usize = 512;
3232
3333
3434// The `Parser` struct keeps track of indexing over our buffer. All niceness
35- // has been abandonned in favor of raw pointer magic. Does that make you feel
35+ // has been abandoned in favor of raw pointer magic. Does that make you feel
3636// dirty? _Good._
3737struct Parser < ' a > {
3838 // Helper buffer for parsing strings that can't be just memcopied from
@@ -48,7 +48,7 @@ struct Parser<'a> {
4848 // Current index
4949 index : usize ,
5050
51- // Lenght of the source
51+ // Length of the source
5252 length : usize ,
5353}
5454
@@ -183,7 +183,7 @@ static ALLOWED: [bool; 256] = [
183183] ;
184184
185185
186- // Expect a string. This is called after encontering , and consuming, a
186+ // Expect a string. This is called after encountering , and consuming, a
187187// double quote character. This macro has a happy path variant where it
188188// does almost nothing as long as all characters are allowed (as described
189189// in the look up table above). If it encounters a closing quote without
Original file line number Diff line number Diff line change 1- // This is a private module that contans `PartialEq` and `From` trait
1+ // This is a private module that contains `PartialEq` and `From` trait
22// implementations for `JsonValue`.
33
44use std:: collections:: { BTreeMap , HashMap } ;
@@ -112,7 +112,7 @@ impl From<BTreeMap<String, JsonValue>> for JsonValue {
112112 for ( key, value) in val. iter_mut ( ) {
113113 // Since BTreeMap has no `drain` available, we can use
114114 // the mutable iterator and replace all values by nulls,
115- // taking ownership and transfering it to the new `Object`.
115+ // taking ownership and transferring it to the new `Object`.
116116 let value = mem:: replace ( value, Null ) ;
117117 object. insert ( key, value) ;
118118 }
You can’t perform that action at this time.
0 commit comments