mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
Latest clippy
This commit is contained in:
@@ -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},
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#![doc = include_str!("../README.md")]
|
||||
#![no_std]
|
||||
|
||||
#![allow(clippy::redundant_closure_call)]
|
||||
|
||||
#[macro_use]
|
||||
mod backend;
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user