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;
215
215
/// Result type used by this crate.
216
216
///
217
217
///
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
219
219
/// `json::Result` instead.
220
220
pub type Result < T > = result:: Result < T , Error > ;
221
221
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ pub struct Number {
34
34
// A byte describing the sign and NaN-ness of the number.
35
35
//
36
36
// category == 0 (NEGATIVE constant) -> negative sign
37
- // category == 1 (POSITIVE constnat ) -> positive sign
37
+ // category == 1 (POSITIVE constant ) -> positive sign
38
38
// category > 1 (matches NAN_MASK constant) -> NaN
39
39
category : u8 ,
40
40
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ static NULL: JsonValue = JsonValue::Null;
16
16
//
17
17
// Additionally this "randomizes" the keys a bit. Should the keys in an object
18
18
// 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
20
20
// will prevent the tree from being constructed in a way where the same branch
21
21
// of each node is always used, effectively producing linear lookup times. Bad!
22
22
//
@@ -149,7 +149,7 @@ impl Drop for Key {
149
149
}
150
150
151
151
// 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 .
153
153
impl Clone for Key {
154
154
fn clone ( & self ) -> Self {
155
155
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;
32
32
33
33
34
34
// 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
36
36
// dirty? _Good._
37
37
struct Parser < ' a > {
38
38
// Helper buffer for parsing strings that can't be just memcopied from
@@ -48,7 +48,7 @@ struct Parser<'a> {
48
48
// Current index
49
49
index : usize ,
50
50
51
- // Lenght of the source
51
+ // Length of the source
52
52
length : usize ,
53
53
}
54
54
@@ -183,7 +183,7 @@ static ALLOWED: [bool; 256] = [
183
183
] ;
184
184
185
185
186
- // Expect a string. This is called after encontering , and consuming, a
186
+ // Expect a string. This is called after encountering , and consuming, a
187
187
// double quote character. This macro has a happy path variant where it
188
188
// does almost nothing as long as all characters are allowed (as described
189
189
// 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
2
2
// implementations for `JsonValue`.
3
3
4
4
use std:: collections:: { BTreeMap , HashMap } ;
@@ -112,7 +112,7 @@ impl From<BTreeMap<String, JsonValue>> for JsonValue {
112
112
for ( key, value) in val. iter_mut ( ) {
113
113
// Since BTreeMap has no `drain` available, we can use
114
114
// 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`.
116
116
let value = mem:: replace ( value, Null ) ;
117
117
object. insert ( key, value) ;
118
118
}
You can’t perform that action at this time.
0 commit comments