Clippy fix

This commit is contained in:
Daniel Lubarov 2022-10-08 13:59:02 -07:00
parent 8ee7265863
commit 443a070003
4 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
pub(crate) fn get_push_opcode(n: u8) -> u8 {
assert!(n > 0);
assert!(n <= 32);
0x60 + (n as u8 - 1)
0x60 + n - 1
}
/// The opcode of a standard instruction (not a `PUSH`).

View File

@ -46,7 +46,7 @@ fn test_ripemd_reference() -> Result<()> {
let kernel = combined_kernel();
let initial_offset = kernel.global_labels["ripemd_stack"];
let initial_stack: Vec<U256> = input.iter().map(|&x| U256::from(x as u32)).rev().collect();
let initial_stack: Vec<U256> = input.iter().map(|&x| U256::from(x)).rev().collect();
let final_stack: Vec<U256> = run_with_kernel(&kernel, initial_offset, initial_stack)?
.stack()
.to_vec();

View File

@ -455,7 +455,7 @@ pub trait PrimeField: Field {
let mut x = w * *self;
let mut b = x * w;
let mut v = Self::TWO_ADICITY as usize;
let mut v = Self::TWO_ADICITY;
while !b.is_one() {
let mut k = 0usize;

View File

@ -443,7 +443,7 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
let mut current = base;
let mut product = self.one_extension();
for j in 0..bits_u64(exponent as u64) {
for j in 0..bits_u64(exponent) {
if j != 0 {
current = self.square_extension(current);
}