mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 13:09:24 +00:00
Meaningful changes from aggressive-clippy
I do want to enable a few specific lints, yet aggressive-clippy as a whole isn't worthwhile.
This commit is contained in:
@@ -176,13 +176,8 @@ pub fn test_invalid_commitment<R: RngCore + CryptoRng, C: Curve>(rng: &mut R) {
|
||||
let nonce =
|
||||
preprocess.commitments.nonces.get_mut(usize::try_from(rng.next_u64()).unwrap() % 2).unwrap();
|
||||
let generators_len = nonce.generators.len();
|
||||
*nonce
|
||||
.generators
|
||||
.get_mut(usize::try_from(rng.next_u64()).unwrap() % generators_len)
|
||||
.unwrap()
|
||||
.0
|
||||
.get_mut(usize::try_from(rng.next_u64()).unwrap() % 2)
|
||||
.unwrap() = C::G::random(&mut *rng);
|
||||
nonce.generators[usize::try_from(rng.next_u64()).unwrap() % generators_len].0
|
||||
[usize::try_from(rng.next_u64()).unwrap() % 2] = C::G::random(&mut *rng);
|
||||
|
||||
// The commitments are validated at time of deserialization (read_preprocess)
|
||||
// Accordingly, serialize it and read it again to make sure that errors
|
||||
|
||||
Reference in New Issue
Block a user