Skip to content

Commit 6de288f

Browse files
committed
cargo fmt
1 parent f9c4e53 commit 6de288f

File tree

5 files changed

+17
-27
lines changed

5 files changed

+17
-27
lines changed

src/descriptor/key.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -939,12 +939,9 @@ impl<K: InnerXKey> DescriptorXKey<K> {
939939
let (fingerprint, path) = keysource;
940940

941941
let (compare_fingerprint, compare_path) = match self.origin {
942-
Some((fingerprint, ref path)) => (
943-
fingerprint,
944-
path.into_iter()
945-
.chain(&self.derivation_path)
946-
.collect(),
947-
),
942+
Some((fingerprint, ref path)) => {
943+
(fingerprint, path.into_iter().chain(&self.derivation_path).collect())
944+
}
948945
None => (
949946
self.xkey.xkey_fingerprint(secp),
950947
self.derivation_path.into_iter().collect::<Vec<_>>(),

src/descriptor/tr.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ impl<Pk: MiniscriptKey> PartialEq for Tr<Pk> {
9090
impl<Pk: MiniscriptKey> Eq for Tr<Pk> {}
9191

9292
impl<Pk: MiniscriptKey> PartialOrd for Tr<Pk> {
93-
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
94-
Some(self.cmp(other))
95-
}
93+
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> { Some(self.cmp(other)) }
9694
}
9795

9896
impl<Pk: MiniscriptKey> Ord for Tr<Pk> {

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,6 @@ mod tests {
811811
}
812812
}
813813

814-
815814
#[allow(unused_imports)] // this is an internal prelude module; not all imports are used with every feature combination
816815
mod prelude {
817816
// Mutex implementation from LDK

src/miniscript/types/extra_props.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -828,17 +828,16 @@ impl Property for ExtData {
828828
});
829829

830830
ops_count_sat_vec.sort_by(sat_minus_dissat);
831-
let op_count_sat =
832-
ops_count_sat_vec
833-
.iter()
834-
.enumerate()
835-
.try_fold(0, |acc, (i, &(x, y))| {
836-
if i <= k {
837-
x.map(|x| acc + x)
838-
} else {
839-
Some(acc + y)
840-
}
841-
});
831+
let op_count_sat = ops_count_sat_vec
832+
.iter()
833+
.enumerate()
834+
.try_fold(0, |acc, (i, &(x, y))| {
835+
if i <= k {
836+
x.map(|x| acc + x)
837+
} else {
838+
Some(acc + y)
839+
}
840+
});
842841

843842
Ok(ExtData {
844843
pk_cost: pk_cost + n - 1, //all pk cost + (n-1)*ADD

src/plan.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -723,12 +723,9 @@ impl Assets {
723723
fn append(&mut self, b: Self) {
724724
self.keys.extend(b.keys);
725725
self.sha256_preimages.extend(b.sha256_preimages);
726-
self.hash256_preimages
727-
.extend(b.hash256_preimages);
728-
self.ripemd160_preimages
729-
.extend(b.ripemd160_preimages);
730-
self.hash160_preimages
731-
.extend(b.hash160_preimages);
726+
self.hash256_preimages.extend(b.hash256_preimages);
727+
self.ripemd160_preimages.extend(b.ripemd160_preimages);
728+
self.hash160_preimages.extend(b.hash160_preimages);
732729

733730
self.relative_timelock = b.relative_timelock.or(self.relative_timelock);
734731
self.absolute_timelock = b.absolute_timelock.or(self.absolute_timelock);

0 commit comments

Comments
 (0)