Skip to content

Commit

Permalink
Fix formatting and clippy with newer toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
maurges committed Sep 20, 2023
1 parent 8e8e1c4 commit 803c275
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion generic-ec-curves/src/rust_crypto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl<C: CurveName, X> fmt::Debug for RustCryptoCurve<C, X> {

impl<C, X> Clone for RustCryptoCurve<C, X> {
fn clone(&self) -> Self {
Self { _ph: PhantomData }
*self
}
}

Expand Down
2 changes: 1 addition & 1 deletion generic-ec-curves/src/rust_crypto/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ where
E: CurveArithmetic,
{
fn clone(&self) -> Self {
Self(self.0)
*self
}
}

Expand Down
2 changes: 1 addition & 1 deletion generic-ec-curves/src/rust_crypto/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl<E: CurveArithmetic> Default for RustCryptoScalar<E> {

impl<E: CurveArithmetic> Clone for RustCryptoScalar<E> {
fn clone(&self) -> Self {
Self(self.0)
*self
}
}

Expand Down
8 changes: 4 additions & 4 deletions generic-ec-zkp/src/polynomial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ mod requires_alloc {
{
fn sum<I: Iterator<Item = &'a Polynomial<C>>>(mut iter: I) -> Self {
let Some(mut sum) = iter.next().cloned() else {
return Self{ coefs: vec![] };
};
return Self { coefs: vec![] };
};
for polynomial in iter {
sum += polynomial;
}
Expand All @@ -258,8 +258,8 @@ mod requires_alloc {
{
fn sum<I: Iterator<Item = Polynomial<C>>>(mut iter: I) -> Self {
let Some(mut sum) = iter.next() else {
return Self{ coefs: vec![] };
};
return Self { coefs: vec![] };
};
for polynomial in iter {
sum += &polynomial
}
Expand Down

0 comments on commit 803c275

Please sign in to comment.