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

@@ -184,7 +184,7 @@ impl<C: Curve, T: Sync + Clone + Debug + Transcript, H: Hram<C>> Algorithm<C> fo
&mut self,
_: &ThresholdView<C>,
_: Participant,
_: (),
(): (),
) -> Result<(), FrostError> {
Ok(())
}

View File

@@ -256,7 +256,7 @@ impl<C: Curve> BindingFactor<C> {
}
pub(crate) fn calculate_binding_factors<T: Clone + Transcript>(&mut self, transcript: &T) {
for (l, binding) in self.0.iter_mut() {
for (l, binding) in &mut self.0 {
let mut transcript = transcript.clone();
transcript.append_message(b"participant", C::F::from(u64::from(u16::from(*l))).to_repr());
// It *should* be perfectly fine to reuse a binding factor for multiple nonces

View File

@@ -177,7 +177,7 @@ pub fn sign<R: RngCore + CryptoRng, M: PreprocessMachine>(
machines,
|rng, machines| {
// Cache and rebuild half of the machines
let included = machines.keys().cloned().collect::<Vec<_>>();
let included = machines.keys().copied().collect::<Vec<_>>();
for i in included {
if (rng.next_u64() % 2) == 0 {
let cache = machines.remove(&i).unwrap().cache();

View File

@@ -82,7 +82,7 @@ impl<C: Curve> Algorithm<C> for MultiNonce<C> {
&mut self,
_: &ThresholdView<C>,
_: Participant,
_: (),
(): (),
) -> Result<(), FrostError> {
Ok(())
}