We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 685257a commit 10a71fcCopy full SHA for 10a71fc
1 file changed
src/stage2.rs
@@ -111,6 +111,9 @@ impl<'de> Deserializer<'de> {
111
stack.clear();
112
stack.reserve(structural_indexes.len());
113
114
+ // Safety: Must NOT advance input pointer as part of logic, since we only get the pointer once.
115
+ // Use idx in order to advance through the input.
116
+ let input_ptr = input.as_mut_ptr();
117
let res_ptr = res.as_mut_ptr();
118
let stack_ptr = stack.as_mut_ptr();
119
@@ -185,10 +188,7 @@ impl<'de> Deserializer<'de> {
185
188
macro_rules! insert_str {
186
189
() => {
187
190
insert_res!(Node::String(s2try!(Self::parse_str_(
- input.as_mut_ptr(),
- &input2,
- buffer,
191
- idx
+ input_ptr, &input2, buffer, idx
192
))));
193
};
194
}
0 commit comments