Skip to content

Commit

Permalink
Fix clippy and docs
Browse files Browse the repository at this point in the history
Signed-off-by: maurges <[email protected]>
  • Loading branch information
maurges committed Dec 27, 2024
1 parent 5bbe2a1 commit d072be9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions generic-ec-curves/src/rust_crypto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl<C, X> Default for RustCryptoCurve<C, X> {
/// - RustCrypto curves are always on curve:
/// generic-ec-curves/src/rust_crypto/point.rs:60
/// - k256 is prime order and so is always torsion-free:
/// https://github.com/RustCrypto/elliptic-curves/blob/f06ae5b93f83c571ed7ef7031b99e24759b90f9e/k256/src/arithmetic/hash2curve.rs#L259-L273
/// <https://github.com/RustCrypto/elliptic-curves/blob/f06ae5b93f83c571ed7ef7031b99e24759b90f9e/k256/src/arithmetic/hash2curve.rs#L259-L273>
#[cfg(feature = "secp256k1")]
unsafe impl NoInvalidPoints for Secp256k1 {}
/// Safe because:
Expand All @@ -175,7 +175,7 @@ unsafe impl NoInvalidPoints for Secp256r1 {}
/// - RustCrypto curves are always on curve:
/// generic-ec-curves/src/rust_crypto/point.rs:60
/// - stark is prime order and so is always torsion-free:
/// https://github.com/RustCrypto/elliptic-curves/blob/7a71e403e49fbe92d6b2ae8fe3eabbfdef124975/primeorder/src/projective.rs#L172-L174
/// <https://github.com/RustCrypto/elliptic-curves/blob/7a71e403e49fbe92d6b2ae8fe3eabbfdef124975/primeorder/src/projective.rs#L172-L174>
#[cfg(feature = "stark")]
unsafe impl NoInvalidPoints for Stark {}

Expand Down
4 changes: 2 additions & 2 deletions generic-ec/src/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl<'de, E: Curve> serde::Deserialize<'de> for CurveName<E> {
D: serde::Deserializer<'de>,
{
pub struct CurveNameVisitor<E: Curve>(PhantomType<E>);
impl<'de, E: Curve> serde::de::Visitor<'de> for CurveNameVisitor<E> {
impl<E: Curve> serde::de::Visitor<'_> for CurveNameVisitor<E> {
type Value = CurveName<E>;
fn expecting(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
write!(f, "curve {name}", name = E::CURVE_NAME)
Expand Down Expand Up @@ -734,7 +734,7 @@ mod optional {
pub got: &'g str,
}

impl<'g> fmt::Display for ExpectedCurve<'g> {
impl fmt::Display for ExpectedCurve<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
Expand Down

0 comments on commit d072be9

Please sign in to comment.