Skip to content

Commit

Permalink
Revert "Add assertion checking that a u8 bool is valid"
Browse files Browse the repository at this point in the history
This reverts commit df58872.
  • Loading branch information
dsprenkels committed Mar 15, 2023
1 parent d49e463 commit c1d3561
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ impl Not for Choice {
impl From<u8> for Choice {
#[inline]
fn from(input: u8) -> Choice {
debug_assert!((input == 0u8) | (input == 1u8));
// Our goal is to prevent the compiler from inferring that the value held inside the
// resulting `Choice` struct is really an `i1` instead of an `i8`.
Choice(core::hint::black_box(input))
Expand Down

0 comments on commit c1d3561

Please sign in to comment.