Skip to content

Commit

Permalink
Undo extra changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
finnbear committed Sep 20, 2024
1 parent b33b035 commit 427cae9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# `i686-unknown-linux-gnu` so we just need to check this page for a
# compatible nightly:
# https://rust-lang.github.io/rustup-components-history/mips64-unknown-linux-gnuabi64.html
toolchain: nightly-2024-09-17
toolchain: nightly-2023-04-25
override: true
components: rustfmt, miri
- name: Lint
Expand Down
12 changes: 6 additions & 6 deletions src/serde/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,19 @@ macro_rules! specify {
#[cold]
fn cold<'de>(decoder: &mut SerdeDecoder<'de>, input: &mut &'de [u8]) -> Result<()> {
let &mut SerdeDecoder::Unspecified { length } = decoder else {
type_changed!()
};
type_changed!()
};
*decoder = SerdeDecoder::$variant(Default::default());
decoder.populate(input, length)
}
cold(&mut *$self.decoder, &mut *$self.input)?;
}
}
let SerdeDecoder::$variant(d) = &mut *$self.decoder else {
// Safety: `cold` gets called when decoder isn't the correct decoder. `cold` either
// errors or sets lazy to the correct decoder.
unsafe { core::hint::unreachable_unchecked() };
};
// Safety: `cold` gets called when decoder isn't the correct decoder. `cold` either
// errors or sets lazy to the correct decoder.
unsafe { core::hint::unreachable_unchecked() };
};
d
}};
}
Expand Down

0 comments on commit 427cae9

Please sign in to comment.