We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5e50f1 commit 82422a8Copy full SHA for 82422a8
src/parser.rs
@@ -745,10 +745,10 @@ impl<'a> Parser<'a> {
745
b'\"' => expect_string!(self)
746
};
747
748
- self.depth += 1;
749
-
750
let mut object = Object::with_capacity(self.get_alloc_size());
751
+ self.depth += 1;
+
752
expect!(self, b':');
753
754
object.insert(key, expect_value!(self));
@@ -778,9 +778,10 @@ impl<'a> Parser<'a> {
778
fn read_array(&mut self) -> Result<Vec<JsonValue>> {
779
let first = expect_value!{ self, b']' => return Ok(Vec::new()) };
780
781
+ let mut array = Vec::with_capacity(self.get_alloc_size());
782
783
self.depth += 1;
784
- let mut array = Vec::with_capacity(self.get_alloc_size());
785
array.push(first);
786
787
loop {
0 commit comments