mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-02 13:53:07 +00:00
Clippy fix
This commit is contained in:
parent
8ee7265863
commit
443a070003
@ -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`).
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user