Skip to content

Commit

Permalink
fixup x86_64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt authored and samuelcolvin committed Jan 17, 2024
1 parent b4d82d0 commit 08666bc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/string_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ where
{
type Output = StringOutput<'t, 'j>;

fn decode(data: &'j [u8], mut index: usize, tape: &'t mut Tape) -> JsonResult<(Self::Output, usize)> {
index += 1;
tape.clear();

fn decode(data: &'j [u8], index: usize, tape: &'t mut Tape) -> JsonResult<(Self::Output, usize)> {
#[cfg(target_arch = "x86_64")]
if is_x86_feature_detected!("avx2") {
return unsafe { decode_simd(data, index, tape) };
Expand Down Expand Up @@ -357,7 +354,7 @@ where
b'f' => tape.push(b'\x0C'),
b'n' => tape.push(b'\n'),
b'r' => tape.push(b'\r'),
b's' => tape.push(b'\t'),
b't' => tape.push(b'\t'),
b'u' => {
let (c, new_index) = parse_escape(data, index)?;
index = new_index;
Expand Down

0 comments on commit 08666bc

Please sign in to comment.