Skip to content

Commit

Permalink
elliptic-curve: clippy fixes (#1703)
Browse files Browse the repository at this point in the history
Runs `cargo clippy --all-features --fix` using 1.83.0-beta.1
  • Loading branch information
tarcieri authored Oct 21, 2024
1 parent 326b606 commit c450cb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions elliptic-curve/src/hash2curve/hash2field/expand_msg/xmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ where
let len_in_bytes_u16 = u16::try_from(len_in_bytes).map_err(|_| Error)?;

let b_in_bytes = HashT::OutputSize::to_usize();
let ell = u8::try_from((len_in_bytes + b_in_bytes - 1) / b_in_bytes).map_err(|_| Error)?;
let ell = u8::try_from(len_in_bytes.div_ceil(b_in_bytes)).map_err(|_| Error)?;

let domain = Domain::xmd::<HashT>(dsts)?;
let mut b_0 = HashT::default();
Expand Down Expand Up @@ -103,7 +103,7 @@ where
ell: u8,
}

impl<'a, HashT> ExpanderXmd<'a, HashT>
impl<HashT> ExpanderXmd<'_, HashT>
where
HashT: BlockSizeUser + Default + FixedOutput + HashMarker,
HashT::OutputSize: IsLess<U256>,
Expand Down Expand Up @@ -133,7 +133,7 @@ where
}
}

impl<'a, HashT> Expander for ExpanderXmd<'a, HashT>
impl<HashT> Expander for ExpanderXmd<'_, HashT>
where
HashT: BlockSizeUser + Default + FixedOutput + HashMarker,
HashT::OutputSize: IsLess<U256>,
Expand Down
2 changes: 1 addition & 1 deletion elliptic-curve/src/jwk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ impl<'de> Deserialize<'de> for JwkEcKey {
/// Field visitor
struct FieldVisitor;

impl<'de> de::Visitor<'de> for FieldVisitor {
impl de::Visitor<'_> for FieldVisitor {
type Value = Field;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down

0 comments on commit c450cb7

Please sign in to comment.