resolve clippy lints

This commit is contained in:
Connor Skees 2020-07-04 13:44:52 -04:00
parent fc36a7a1e8
commit 91ff4c10b4
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ pub(crate) fn weave(
) -> Vec<Vec<ComplexSelectorComponent>> {
let mut prefixes: Vec<Vec<ComplexSelectorComponent>> = vec![complexes.remove(0)];
for mut complex in complexes.into_iter() {
for mut complex in complexes {
if complex.is_empty() {
continue;
}

View File

@ -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;