Skip to content

Commit

Permalink
chore: fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Dec 23, 2024
1 parent b146992 commit 091ac1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions psbt/src/coders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ pub trait Encode {
fn encode(&self, writer: &mut dyn Write) -> Result<usize, IoError>;
}

impl<'a, T: Encode> Encode for &'a T {
impl<T: Encode> Encode for &T {
fn encode(&self, writer: &mut dyn Write) -> Result<usize, IoError> { (*self).encode(writer) }
}

Expand Down Expand Up @@ -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<usize> { self.0.write(buf) }
fn flush(&mut self) -> io::Result<()> { self.0.flush() }
}
Expand Down
2 changes: 1 addition & 1 deletion psbt/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ impl Output {
if terminal.len() != 1 {
return None;
}
return terminal.first().copied();
terminal.first().copied()

Check warning on line 1038 in psbt/src/data.rs

View check run for this annotation

Codecov / codecov/patch

psbt/src/data.rs#L1038

Added line #L1038 was not covered by tests
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/signers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ impl<'a> TestnetRefSigner<'a> {
}
}

impl<'a> Signer for TestnetRefSigner<'a> {
impl Signer for TestnetRefSigner<'_> {
type Sign<'s>
= Self
where Self: 's;

fn approve(&self, _: &Psbt) -> Result<Self::Sign<'_>, Rejected> { Ok(self.clone()) }
}

impl<'a> TestnetRefSigner<'a> {
impl TestnetRefSigner<'_> {
fn get(&self, origin: Option<&KeyOrigin>) -> Option<Xpriv> {
let origin = origin?;
self.keys.iter().find_map(|(xo, xpriv)| {
Expand All @@ -100,7 +100,7 @@ impl<'a> TestnetRefSigner<'a> {
}
}

impl<'a> Sign for TestnetRefSigner<'a> {
impl Sign for TestnetRefSigner<'_> {
fn sign_ecdsa(
&self,
message: Sighash,
Expand Down

0 comments on commit 091ac1e

Please sign in to comment.