Skip to content

Commit

Permalink
fixup aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt authored and samuelcolvin committed Jan 17, 2024
1 parent 08666bc commit 84087c9
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/string_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ fn decode_onebyone<'j, 't>(
where
'j: 't,
{
index += 1;

let start = index;
let mut last_escape = start;
let mut found_escape = false;
Expand All @@ -98,7 +100,10 @@ where
};
}
b'\\' => {
found_escape = true;
if !found_escape {
tape.clear();

Check warning on line 104 in src/string_decoder.rs

View check run for this annotation

Codecov / codecov/patch

src/string_decoder.rs#L103-L104

Added lines #L103 - L104 were not covered by tests
found_escape = true;
}
tape.extend_from_slice(&data[last_escape..index]);
index += 1;
if let Some(next_inner) = data.get(index) {
Expand Down Expand Up @@ -142,6 +147,8 @@ fn decode_simd<'j, 't>(
where
'j: 't,
{
index += 1;

let start = index;
let mut last_escape = start;
let mut found_escape = false;
Expand Down Expand Up @@ -213,7 +220,10 @@ where
};
}
b'\\' => {
found_escape = true;
if !found_escape {
tape.clear();
found_escape = true;
}
tape.extend_from_slice(&data[last_escape..index]);
index += 1;
if let Some(next_inner) = data.get(index) {
Expand Down

0 comments on commit 84087c9

Please sign in to comment.