fmt/clippy

This commit is contained in:
Luke Parker
2022-09-17 04:35:08 -04:00
parent fd6c58805f
commit 65c20638ce
11 changed files with 15 additions and 24 deletions

View File

@@ -226,8 +226,7 @@ where
break;
}
let mut bit = *raw_bit as u8;
debug_assert_eq!(bit | 1, 1);
let mut bit = u8::from(*raw_bit);
*raw_bit = false;
// Accumulate this bit
@@ -246,7 +245,7 @@ where
these_bits,
&mut blinding_key,
));
these_bits = 0;
these_bits.zeroize();
}
}
debug_assert_eq!(bits.len(), capacity / bits_per_group);

View File

@@ -34,9 +34,8 @@ pub fn scalar_normalize<F0: PrimeFieldBits + Zeroize, F1: PrimeFieldBits>(
res1 = res1.double();
res2 = res2.double();
let mut bit = *raw_bit as u8;
debug_assert_eq!(bit | 1, 1);
*raw_bit = false;
let mut bit = u8::from(*raw_bit);
*raw_bit = 0;
res1 += F0::from(bit.into());
res2 += F1::from(bit.into());