From 91ff4c10b40290796d431a3ae08341bdd9eb4b37 Mon Sep 17 00:00:00 2001 From: Connor Skees Date: Sat, 4 Jul 2020 13:44:52 -0400 Subject: [PATCH] resolve clippy lints --- src/selector/extend/functions.rs | 2 +- src/selector/extend/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/selector/extend/functions.rs b/src/selector/extend/functions.rs index a4aad5f..ba288e2 100644 --- a/src/selector/extend/functions.rs +++ b/src/selector/extend/functions.rs @@ -70,7 +70,7 @@ pub(crate) fn weave( ) -> Vec> { let mut prefixes: Vec> = vec![complexes.remove(0)]; - for mut complex in complexes.into_iter() { + for mut complex in complexes { if complex.is_empty() { continue; } diff --git a/src/selector/extend/mod.rs b/src/selector/extend/mod.rs index 71c75f5..d27b6e9 100644 --- a/src/selector/extend/mod.rs +++ b/src/selector/extend/mod.rs @@ -412,7 +412,7 @@ impl Extender { // `extensions`, extension fails for `compound`. // todo: test for `extensions.len() > 2`. may cause issues if !targets_used.is_empty() - && targets_used.len() != extensions.map_or(self.extensions.len(), |e| e.len()) + && targets_used.len() != extensions.map_or(self.extensions.len(), HashMap::len) && self.mode != ExtendMode::Normal { return None;