Skip to content

Commit 36f50bb

Browse files
committed
fixup clippy
1 parent 5e17db8 commit 36f50bb

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

dsa/src/components.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ impl EncodeValue for Components {
111111
}
112112
}
113113

114-
impl<'a> Sequence<'a> for Components {}
114+
impl Sequence<'_> for Components {}

dsa/src/generate/components.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ pub fn common<R: CryptoRng + ?Sized>(
6969
break NonZero::new(g).unwrap();
7070
}
7171

72-
h = h + BoxedUint::one();
72+
// https://github.com/RustCrypto/crypto-bigint/issues/784
73+
#[allow(clippy::assign_op_pattern)]
74+
{
75+
h = h + BoxedUint::one();
76+
}
7377
};
7478

7579
let q = NonZero::new(q.shorten(n)).unwrap();

dsa/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl PartialOrd for Signature {
162162
}
163163
}
164164

165-
impl<'a> Sequence<'a> for Signature {}
165+
impl Sequence<'_> for Signature {}
166166

167167
impl SignatureEncoding for Signature {
168168
type Repr = Box<[u8]>;

dsa/src/signing_key.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl SigningKey {
100100
extern crate std;
101101

102102
let components = self.verifying_key().components();
103-
let ref key_size = components.key_size;
103+
let key_size = &components.key_size;
104104
let (p, q, g) = (components.p(), components.q(), components.g());
105105
let x = self.x();
106106

dsa/src/verifying_key.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl VerifyingKey {
6161
#[must_use]
6262
fn verify_prehashed(&self, hash: &[u8], signature: &Signature) -> Option<bool> {
6363
let components = self.components();
64-
let ref key_size = components.key_size;
64+
let key_size = &components.key_size;
6565
let (p, q, g) = (components.p(), components.q(), components.g());
6666
let (r, s) = (signature.r(), signature.s());
6767
debug_assert_eq!(key_size.n_aligned(), s.bits_precision());

0 commit comments

Comments
 (0)