Skip to content

Commit

Permalink
Change bitmask to u128::MAX
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaRedHand committed Apr 21, 2023
1 parent 4a55fd4 commit 7a1bea7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/hint_processor/builtin_hint_processor/uint_utils.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use felt::Felt252;
use num_bigint::BigUint;
use num_traits::One;

pub(crate) fn split<const T: usize>(num: &BigUint, num_bits_shift: u32) -> [BigUint; T] {
let mut num = num.clone();
let bitmask = &((BigUint::one() << num_bits_shift) - 1_u32);
let bitmask = &BigUint::from(u128::MAX);
[0; T].map(|_| {
let a = &num & bitmask;
num >>= num_bits_shift;
Expand Down

0 comments on commit 7a1bea7

Please sign in to comment.