Add workspace lints

This commit is contained in:
Luke Parker
2023-12-16 20:54:24 -05:00
parent c40ce00955
commit ea3af28139
122 changed files with 329 additions and 128 deletions

View File

@@ -13,6 +13,9 @@ rust-version = "1.70"
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[lints]
workspace = true
[dependencies]
thiserror = { version = "1", default-features = false, optional = true }

View File

@@ -226,7 +226,7 @@ impl<C: Ciphersuite, E: Encryptable> EncryptedMessage<C, E> {
use ciphersuite::group::ff::PrimeField;
let mut repr = <C::F as PrimeField>::Repr::default();
for b in repr.as_mut().iter_mut() {
for b in repr.as_mut() {
*b = 255;
}
// Tries to guarantee the above assumption.

View File

@@ -257,7 +257,7 @@ mod lib {
self.params.zeroize();
self.secret_share.zeroize();
self.group_key.zeroize();
for (_, share) in self.verification_shares.iter_mut() {
for share in self.verification_shares.values_mut() {
share.zeroize();
}
}
@@ -410,10 +410,10 @@ mod lib {
self.group_key.zeroize();
self.included.zeroize();
self.secret_share.zeroize();
for (_, share) in self.original_verification_shares.iter_mut() {
for share in self.original_verification_shares.values_mut() {
share.zeroize();
}
for (_, share) in self.verification_shares.iter_mut() {
for share in self.verification_shares.values_mut() {
share.zeroize();
}
}
@@ -484,7 +484,7 @@ mod lib {
);
let mut verification_shares = self.verification_shares();
for (i, share) in verification_shares.iter_mut() {
for (i, share) in &mut verification_shares {
*share *= lagrange::<C::F>(*i, &included);
}