From 091ac1ebd7d59b4b7ba01e00d1dd14c5fb32c14d Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 23 Dec 2024 20:56:08 +0100 Subject: [PATCH] chore: fix clippy lints --- psbt/src/coders.rs | 4 ++-- psbt/src/data.rs | 2 +- src/signers.rs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/psbt/src/coders.rs b/psbt/src/coders.rs index d0e46ba..11dfa38 100644 --- a/psbt/src/coders.rs +++ b/psbt/src/coders.rs @@ -185,7 +185,7 @@ pub trait Encode { fn encode(&self, writer: &mut dyn Write) -> Result; } -impl<'a, T: Encode> Encode for &'a T { +impl Encode for &T { fn encode(&self, writer: &mut dyn Write) -> Result { (*self).encode(writer) } } @@ -677,7 +677,7 @@ macro_rules! psbt_code_using_consensus { } struct WriteWrap<'a>(&'a mut dyn Write); -impl<'a> Write for WriteWrap<'a> { +impl Write for WriteWrap<'_> { fn write(&mut self, buf: &[u8]) -> io::Result { self.0.write(buf) } fn flush(&mut self) -> io::Result<()> { self.0.flush() } } diff --git a/psbt/src/data.rs b/psbt/src/data.rs index d2de3ab..9814712 100644 --- a/psbt/src/data.rs +++ b/psbt/src/data.rs @@ -1035,7 +1035,7 @@ impl Output { if terminal.len() != 1 { return None; } - return terminal.first().copied(); + terminal.first().copied() } } diff --git a/src/signers.rs b/src/signers.rs index c8b898e..15bd42c 100644 --- a/src/signers.rs +++ b/src/signers.rs @@ -80,7 +80,7 @@ impl<'a> TestnetRefSigner<'a> { } } -impl<'a> Signer for TestnetRefSigner<'a> { +impl Signer for TestnetRefSigner<'_> { type Sign<'s> = Self where Self: 's; @@ -88,7 +88,7 @@ impl<'a> Signer for TestnetRefSigner<'a> { fn approve(&self, _: &Psbt) -> Result, Rejected> { Ok(self.clone()) } } -impl<'a> TestnetRefSigner<'a> { +impl TestnetRefSigner<'_> { fn get(&self, origin: Option<&KeyOrigin>) -> Option { let origin = origin?; self.keys.iter().find_map(|(xo, xpriv)| { @@ -100,7 +100,7 @@ impl<'a> TestnetRefSigner<'a> { } } -impl<'a> Sign for TestnetRefSigner<'a> { +impl Sign for TestnetRefSigner<'_> { fn sign_ecdsa( &self, message: Sighash,