Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jotabulacios committed Feb 20, 2025
1 parent 052af98 commit 4c7a1ec
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions crypto/src/hash/monolith/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ impl<const WIDTH: usize, const NUM_FULL_ROUNDS: usize> MonolithMersenne31<WIDTH,
// S-box lookups
fn bars(&self, state: &mut [u32]) {
for state in state.iter_mut().take(NUM_BARS) {
*state = (self.lookup2[(*state >> 16) as u16 as usize] as u32) << 16
| self.lookup1[*state as u16 as usize] as u32;
*state = ((self.lookup2[(*state >> 16) as u16 as usize] as u32) << 16)
| (self.lookup1[*state as u16 as usize] as u32);
}
}

Expand Down
1 change: 0 additions & 1 deletion math/benches/fields/mersenne31.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub type Fp2E = FieldElement<Degree2ExtensionField>;
pub type Fp4E = FieldElement<Degree4ExtensionField>;

#[inline(never)]
#[no_mangle]
#[export_name = "util::rand_mersenne31_field_elements"]
pub fn rand_field_elements(num: usize) -> Vec<(F, F)> {
let mut result = Vec::with_capacity(num);
Expand Down
1 change: 0 additions & 1 deletion math/benches/fields/mersenne31_montgomery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pub type F = FieldElement<Mersenne31MontgomeryPrimeField>;
const NUM_LIMBS: usize = 1;

#[inline(never)]
#[no_mangle]
#[export_name = "util::rand_mersenne31_mont_field_elements"]
pub fn rand_field_elements(num: usize) -> Vec<(F, F)> {
let mut result = Vec::with_capacity(num);
Expand Down
1 change: 0 additions & 1 deletion math/benches/fields/stark252.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use rand::random;
pub type F = FieldElement<Stark252PrimeField>;

#[inline(never)]
#[no_mangle]
#[export_name = "util::rand_field_elements"]
pub fn rand_field_elements(num: usize) -> Vec<(F, F)> {
let mut result = Vec::with_capacity(num);
Expand Down
4 changes: 0 additions & 4 deletions math/benches/utils/stark252_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ pub type FE = FieldElement<F>;

// NOTE: intentional duplicate to help IAI skip setup code
#[inline(never)]
#[no_mangle]
#[export_name = "util::bitrev_permute"]
pub fn bitrev_permute(input: &mut [FE]) {
in_place_bit_reverse_permute(input);
}

#[inline(never)]
#[no_mangle]
#[export_name = "util::rand_field_elements"]
pub fn rand_field_elements(order: u64) -> Vec<FE> {
let mut result = Vec::with_capacity(1 << order);
Expand All @@ -33,14 +31,12 @@ pub fn rand_field_elements(order: u64) -> Vec<FE> {
}

#[inline(never)]
#[no_mangle]
#[export_name = "util::rand_poly"]
pub fn rand_poly(order: u64) -> Polynomial<FE> {
Polynomial::new(&rand_field_elements(order))
}

#[inline(never)]
#[no_mangle]
#[export_name = "util::get_twiddles"]
pub fn twiddles(order: u64, config: RootsConfig) -> Vec<FE> {
get_twiddles(order, config).unwrap()
Expand Down

0 comments on commit 4c7a1ec

Please # to comment.