]> Untitled Git - bdk/commitdiff
[ci] Fix clippy warnings for 1.47.0
authorSteve Myers <steve@notmandatory.org>
Thu, 8 Oct 2020 23:55:49 +0000 (16:55 -0700)
committerSteve Myers <steve@notmandatory.org>
Sat, 10 Oct 2020 17:31:08 +0000 (10:31 -0700)
src/descriptor/policy.rs
src/wallet/export.rs

index 4df6248aa0b595720123dbb8bc61b3dcbee4bcff..6c0246389297256fc9d85d702235567fc36c86a9 100644 (file)
@@ -140,13 +140,11 @@ pub enum SatisfiableItem {
 
 impl SatisfiableItem {
     pub fn is_leaf(&self) -> bool {
-        match self {
-            SatisfiableItem::Thresh {
-                items: _,
-                threshold: _,
-            } => false,
-            _ => true,
-        }
+        !matches!(self,
+        SatisfiableItem::Thresh {
+            items: _,
+            threshold: _,
+        })
     }
 
     pub fn id(&self) -> String {
index ecb05af3b60da96ef1eaac2fa16445abf37618ae..bb97ecb67f66738bc453ed60e2c08ed20ec07c97 100644 (file)
@@ -133,7 +133,7 @@ impl WalletExport {
                     .into_iter()
                     .map(|tx| tx.height.unwrap_or(0))
                     .collect::<Vec<_>>();
-                heights.sort();
+                heights.sort_unstable();
 
                 *heights.last().unwrap_or(&0)
             }