Skip to content

Commit b7e8ba7

Browse files
committed
Merge #776: fix: fix some clippy warnings
0f7e5ff fix: fix some clippy warnings (Dimitris Apostolou) Pull request description: ACKs for top commit: apoelstra: ACK 0f7e5ff; successfully ran local tests Tree-SHA512: b72ac3b9d6bb2fe96104640acf1335b639bcfd3fbefde8d66deae2c0924e25e3f6ae13055812d1cb5d2f807aaa9a600f94b9c1319ba21ff92e13874a64ab0a36
2 parents 073e2af + 0f7e5ff commit b7e8ba7

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/context.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ mod private {
100100
use super::*;
101101
pub trait Sealed {}
102102

103-
impl<'buf> Sealed for AllPreallocated<'buf> {}
104-
impl<'buf> Sealed for VerifyOnlyPreallocated<'buf> {}
105-
impl<'buf> Sealed for SignOnlyPreallocated<'buf> {}
103+
impl Sealed for AllPreallocated<'_> {}
104+
impl Sealed for VerifyOnlyPreallocated<'_> {}
105+
impl Sealed for SignOnlyPreallocated<'_> {}
106106
}
107107

108108
#[cfg(feature = "alloc")]
@@ -274,13 +274,13 @@ mod alloc_only {
274274
}
275275
}
276276

277-
impl<'buf> Signing for SignOnlyPreallocated<'buf> {}
278-
impl<'buf> Signing for AllPreallocated<'buf> {}
277+
impl Signing for SignOnlyPreallocated<'_> {}
278+
impl Signing for AllPreallocated<'_> {}
279279

280-
impl<'buf> Verification for VerifyOnlyPreallocated<'buf> {}
281-
impl<'buf> Verification for AllPreallocated<'buf> {}
280+
impl Verification for VerifyOnlyPreallocated<'_> {}
281+
impl Verification for AllPreallocated<'_> {}
282282

283-
unsafe impl<'buf> Context for SignOnlyPreallocated<'buf> {
283+
unsafe impl Context for SignOnlyPreallocated<'_> {
284284
const FLAGS: c_uint = ffi::SECP256K1_START_SIGN;
285285
const DESCRIPTION: &'static str = "signing only";
286286

@@ -289,7 +289,7 @@ unsafe impl<'buf> Context for SignOnlyPreallocated<'buf> {
289289
}
290290
}
291291

292-
unsafe impl<'buf> Context for VerifyOnlyPreallocated<'buf> {
292+
unsafe impl Context for VerifyOnlyPreallocated<'_> {
293293
const FLAGS: c_uint = ffi::SECP256K1_START_VERIFY;
294294
const DESCRIPTION: &'static str = "verification only";
295295

@@ -298,7 +298,7 @@ unsafe impl<'buf> Context for VerifyOnlyPreallocated<'buf> {
298298
}
299299
}
300300

301-
unsafe impl<'buf> Context for AllPreallocated<'buf> {
301+
unsafe impl Context for AllPreallocated<'_> {
302302
const FLAGS: c_uint = SignOnlyPreallocated::FLAGS | VerifyOnlyPreallocated::FLAGS;
303303
const DESCRIPTION: &'static str = "all capabilities";
304304

src/key.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ impl<'de> serde::Deserialize<'de> for Parity {
15171517
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
15181518
struct Visitor;
15191519

1520-
impl<'de> serde::de::Visitor<'de> for Visitor {
1520+
impl serde::de::Visitor<'_> for Visitor {
15211521
type Value = Parity;
15221522

15231523
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ fn to_hex<'a>(src: &[u8], target: &'a mut [u8]) -> Result<&'a str, ()> {
499499
}
500500
let result = &target[..hex_len];
501501
debug_assert!(str::from_utf8(result).is_ok());
502-
return unsafe { Ok(str::from_utf8_unchecked(result)) };
502+
unsafe { Ok(str::from_utf8_unchecked(result)) }
503503
}
504504

505505
#[cfg(feature = "rand")]

src/serde_util.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl<T> FromStrVisitor<T> {
1818
}
1919
}
2020

21-
impl<'de, T> de::Visitor<'de> for FromStrVisitor<T>
21+
impl<T> de::Visitor<'_> for FromStrVisitor<T>
2222
where
2323
T: FromStr,
2424
<T as FromStr>::Err: fmt::Display,
@@ -49,7 +49,7 @@ where
4949
}
5050
}
5151

52-
impl<'de, F, T, Err> de::Visitor<'de> for BytesVisitor<F>
52+
impl<F, T, Err> de::Visitor<'_> for BytesVisitor<F>
5353
where
5454
F: FnOnce(&[u8]) -> Result<T, Err>,
5555
Err: fmt::Display,

0 commit comments

Comments
 (0)