From: Steve Myers Date: Thu, 8 Oct 2020 23:55:49 +0000 (-0700) Subject: [ci] Fix clippy warnings for 1.47.0 X-Git-Tag: v0.2.0~111 X-Git-Url: http://internal-gitweb-vhost/%22https:/parse/scripts/database/-script/static/struct.WScriptHash.html?a=commitdiff_plain;h=070d481849f0fa037a05ea66cb6530ac4a118b4b;p=bdk [ci] Fix clippy warnings for 1.47.0 --- 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) }