diff --git a/src/actions/test.rs b/src/actions/test.rs index 4edb10d..34d7aed 100644 --- a/src/actions/test.rs +++ b/src/actions/test.rs @@ -101,8 +101,7 @@ impl TestFilters { _ => self .targets .iter() - .map(|t| vec!["--test", t.as_str()]) - .flatten() + .flat_map(|t| vec!["--test", t.as_str()]) .collect(), }; diff --git a/src/odra_toml.rs b/src/odra_toml.rs index e80215f..0505732 100644 --- a/src/odra_toml.rs +++ b/src/odra_toml.rs @@ -22,7 +22,7 @@ impl Contract { .split_terminator("::") .next() .unwrap_or_else(|| MalformedFqn.print_and_die()) - .replace("-", "_") + .replace('-', "_") .to_string() } @@ -31,7 +31,7 @@ impl Contract { project .members .iter() - .find(|m| m.name.replace("-", "_") == self.module_name()) + .find(|m| m.name.replace('-', "_") == self.module_name()) .unwrap_or_else(|| { Error::CrateOfContractNotFound(self.module_name()).print_and_die() }) @@ -101,7 +101,7 @@ impl OdraToml { .split_terminator("::") .next() .unwrap_or_else(|| Error::MalformedFqn.print_and_die()) - == crate_name.replace("-", "_") + == crate_name.replace('-', "_") }) } }