WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit c450cb7

Browse files
authored
elliptic-curve: clippy fixes (#1703)
Runs `cargo clippy --all-features --fix` using 1.83.0-beta.1
1 parent 326b606 commit c450cb7

File tree

2 files changed

+4
-4
lines changed
  • elliptic-curve/src

2 files changed

+4
-4
lines changed

elliptic-curve/src/hash2curve/hash2field/expand_msg/xmd.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ where
5353
let len_in_bytes_u16 = u16::try_from(len_in_bytes).map_err(|_| Error)?;
5454

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

5858
let domain = Domain::xmd::<HashT>(dsts)?;
5959
let mut b_0 = HashT::default();
@@ -103,7 +103,7 @@ where
103103
ell: u8,
104104
}
105105

106-
impl<'a, HashT> ExpanderXmd<'a, HashT>
106+
impl<HashT> ExpanderXmd<'_, HashT>
107107
where
108108
HashT: BlockSizeUser + Default + FixedOutput + HashMarker,
109109
HashT::OutputSize: IsLess<U256>,
@@ -133,7 +133,7 @@ where
133133
}
134134
}
135135

136-
impl<'a, HashT> Expander for ExpanderXmd<'a, HashT>
136+
impl<HashT> Expander for ExpanderXmd<'_, HashT>
137137
where
138138
HashT: BlockSizeUser + Default + FixedOutput + HashMarker,
139139
HashT::OutputSize: IsLess<U256>,

elliptic-curve/src/jwk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ impl<'de> Deserialize<'de> for JwkEcKey {
361361
/// Field visitor
362362
struct FieldVisitor;
363363

364-
impl<'de> de::Visitor<'de> for FieldVisitor {
364+
impl de::Visitor<'_> for FieldVisitor {
365365
type Value = Field;
366366

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

0 commit comments

Comments
 (0)