From 070d481849f0fa037a05ea66cb6530ac4a118b4b Mon Sep 17 00:00:00 2001 From: Steve Myers Date: Thu, 8 Oct 2020 16:55:49 -0700 Subject: [PATCH] [ci] Fix clippy warnings for 1.47.0 --- src/descriptor/policy.rs | 12 +++++------- src/wallet/export.rs | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/descriptor/policy.rs b/src/descriptor/policy.rs index 4df6248a..6c024638 100644 --- a/src/descriptor/policy.rs +++ b/src/descriptor/policy.rs @@ -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 { diff --git a/src/wallet/export.rs b/src/wallet/export.rs index ecb05af3..bb97ecb6 100644 --- a/src/wallet/export.rs +++ b/src/wallet/export.rs @@ -133,7 +133,7 @@ impl WalletExport { .into_iter() .map(|tx| tx.height.unwrap_or(0)) .collect::>(); - heights.sort(); + heights.sort_unstable(); *heights.last().unwrap_or(&0) }