Skip to content

Commit

Permalink
Changed bit shift logic + added more CI logging
Browse files Browse the repository at this point in the history
  • Loading branch information
1Git2Clone committed Nov 17, 2024
1 parent 0b843a8 commit 67c68ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
- name: hw1-test-1
run: cargo test --verbose --features hw1-test-1
- name: hw1-test-2
run: RUST_BACKTRACE=1 cargo test --verbose --features hw1-test-2
run: RUSTFLAGS="-C overflow-checks=on" RUST_BACKTRACE=full cargo test --verbose --features hw1-test-2
- name: hw1-test-3
run: cargo test --verbose --features hw1-test-3
4 changes: 2 additions & 2 deletions src/utils/gcd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use num_traits::PrimInt;

pub trait Gcd
where
Self: PrimInt + ShrAssign<u32> + SubAssign,
Self: PrimInt + ShrAssign<usize> + SubAssign,
{
/// NOTE: Exists for the internal LCM implementation.
#[deprecated(note = "use crate::utils::gcd::Gcd::gcd() instead.")]
Expand All @@ -24,7 +24,7 @@ where
swap(&mut self, &mut other)
}
other -= self;
other >>= other.trailing_zeros();
other >>= other.trailing_zeros() as usize;
}

self << k
Expand Down

0 comments on commit 67c68ab

Please sign in to comment.