Skip to content

Commit

Permalink
Merge pull request #799 from hacspec/fix-one-zero-bounded-ints
Browse files Browse the repository at this point in the history
fix(bounded-ints): zero and one were inverted
  • Loading branch information
W95Psp authored Jul 24, 2024
2 parents 3ddbf4b + 2dbca93 commit 2a66ae9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hax-bounded-integers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ macro_rules! derivate_operations_for_bounded {
impl<INTRO_CONSTANTS> Zero for $bounded_t<USE_CONSTANTS> {
#[inline(always)]
fn zero() -> Self {
Self::new(1)
Self::new(0)
}
}

impl<INTRO_CONSTANTS> One for $bounded_t<USE_CONSTANTS> {
#[inline(always)]
fn one() -> Self {
Self::new(0)
Self::new(1)
}
}

Expand Down

0 comments on commit 2a66ae9

Please sign in to comment.