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 Mar 20, 2024
1 parent 7e38d32 commit b9d84ae
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion descriptors/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl FromStr for InputDescriptor {
} else if fragment.contains(':') {
let mut split = fragment.split(':');
d.tweak = match (split.next(), split.next(), split.next()) {
(Some(x), _, _) if x.is_empty() => None,
(Some(""), _, _) => None,
(Some(fingerprint), Some(tweak), None) => {
Some((fingerprint.parse()?, tweak.parse()?))
}
Expand Down
7 changes: 1 addition & 6 deletions hd/src/ranges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,7 @@ impl<Index> PartialOrd for IndexRange<Index>
where
Index: SegmentIndexes,
{
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
match self.first_index().partial_cmp(&other.first_index()) {
Some(Ordering::Equal) => self.last_index().partial_cmp(&other.last_index()),
other => other,
}
}
fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(self.cmp(other)) }
}

impl<Index> Ord for IndexRange<Index>
Expand Down
4 changes: 2 additions & 2 deletions psbt/src/lex_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ impl LexOrder for PsbtV0 {
.input
.clone()
.into_iter()
.zip(self.inputs.clone().into_iter())
.zip(self.inputs.clone())
.collect::<Vec<(_, _)>>();
inputs.sort_by_key(|(k, _)| k.previous_output);

let mut outputs = tx
.output
.clone()
.into_iter()
.zip(self.outputs.clone().into_iter())
.zip(self.outputs.clone())
.collect::<Vec<(_, _)>>();
outputs.lex_order();

Expand Down
2 changes: 1 addition & 1 deletion psbt/src/sign/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl SignAll for Psbt {
.map(|input| {
input
.input_prevout()
.map(Clone::clone)
.cloned()
.map_err(SignInputError::from)
.map_err(|err| SignError::with_input_no(err, input.index()))
})
Expand Down
1 change: 1 addition & 0 deletions src/bin/btc-hot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ impl Args {
Ok(())
}

#[allow(clippy::too_many_arguments)]
fn derive(
&self,
seed_file: &Path,
Expand Down

0 comments on commit b9d84ae

Please sign in to comment.