Skip to content

Commit

Permalink
fix: clippy warning (#367)
Browse files Browse the repository at this point in the history
* chore: fix clippy warning

* fix: clippy warning in example
  • Loading branch information
jacobtrombetta authored Mar 3, 2025
1 parent b3d8cd4 commit b2f2bd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/and.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub fn u64_into_bit_vec_le<Scalar: PrimeField, CS: ConstraintSystem<Scalar>>(
let mut tmp = Vec::with_capacity(64);

for i in 0..64 {
tmp.push(Some(*value >> i & 1 == 1));
tmp.push(Some((*value >> i) & 1 == 1));
}

tmp
Expand Down
2 changes: 1 addition & 1 deletion src/gadgets/nonnative/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl<Scalar: PrimeField> BitAccess for Scalar {

let (byte_pos, bit_pos) = (i / 8, i % 8);
let byte = self.to_repr().as_ref()[byte_pos];
let bit = byte >> bit_pos & 1;
let bit = (byte >> bit_pos) & 1;
Some(bit == 1)
}
}
Expand Down

0 comments on commit b2f2bd6

Please sign in to comment.