From dbec463d2714b57bfd23ba0363728a0484415e7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Pobiar=C5=BCyn?= Date: Fri, 28 Jun 2024 10:30:45 +0200 Subject: [PATCH] fix styling --- src/actions/test.rs | 3 +-- src/odra_toml.rs | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) 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('-', "_") }) } }