Latest clippy

This commit is contained in:
Luke Parker
2023-08-01 02:49:31 -04:00
parent c338b92067
commit 53d86e2a29
12 changed files with 21 additions and 13 deletions

View File

@@ -2,6 +2,8 @@
#![no_std] // Prevents writing new code, in what should be a simple wrapper, which requires std
#![doc = include_str!("../README.md")]
#![allow(clippy::redundant_closure_call)]
use core::{
borrow::Borrow,
ops::{Deref, Add, AddAssign, Sub, SubAssign, Neg, Mul, MulAssign},

View File

@@ -2,6 +2,8 @@
#![doc = include_str!("../README.md")]
#![no_std]
#![allow(clippy::redundant_closure_call)]
#[macro_use]
mod backend;

View File

@@ -255,7 +255,7 @@ impl<C: Curve> BindingFactor<C> {
self.0.insert(i, IndividualBinding { commitments, binding_factors: None });
}
pub(crate) fn calculate_binding_factors<T: Clone + Transcript>(&mut self, transcript: &mut T) {
pub(crate) fn calculate_binding_factors<T: Clone + Transcript>(&mut self, transcript: &T) {
for (l, binding) in self.0.iter_mut() {
let mut transcript = transcript.clone();
transcript.append_message(b"participant", C::F::from(u64::from(u16::from(*l))).to_repr());

View File

@@ -388,7 +388,7 @@ impl<C: Curve, A: Algorithm<C>> SignMachine<A::Signature> for AlgorithmSignMachi
);
// Generate the per-signer binding factors
B.calculate_binding_factors(&mut rho_transcript);
B.calculate_binding_factors(&rho_transcript);
// Merge the rho transcript back into the global one to ensure its advanced, while
// simultaneously committing to everything

View File

@@ -159,7 +159,7 @@ where
// Attempt to get them marked as read
#[rustversion::since(1.66)]
fn mark_read<D: Send + Clone + SecureDigest>(transcript: &mut DigestTranscript<D>) {
fn mark_read<D: Send + Clone + SecureDigest>(transcript: &DigestTranscript<D>) {
// Just get a challenge from the state
let mut challenge = core::hint::black_box(transcript.0.clone().finalize());
challenge.as_mut().zeroize();