From 7afbb8b0f75da315f8f849049c475c8d114834da Mon Sep 17 00:00:00 2001 From: Jacob Trombetta Date: Fri, 28 Feb 2025 15:49:16 -0500 Subject: [PATCH 1/2] chore: fix clippy warning --- src/gadgets/nonnative/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gadgets/nonnative/mod.rs b/src/gadgets/nonnative/mod.rs index 80c8e12a..d2d590df 100644 --- a/src/gadgets/nonnative/mod.rs +++ b/src/gadgets/nonnative/mod.rs @@ -26,7 +26,7 @@ impl 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) } } From b187af81189cd7ea9ced97f50a79e10c269a891a Mon Sep 17 00:00:00 2001 From: Jacob Trombetta Date: Mon, 3 Mar 2025 14:49:35 -0500 Subject: [PATCH 2/2] fix: clippy warning in example --- examples/and.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/and.rs b/examples/and.rs index 35fb965b..2f2fad80 100644 --- a/examples/and.rs +++ b/examples/and.rs @@ -72,7 +72,7 @@ pub fn u64_into_bit_vec_le>( 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