From a5975ca1ac94dd42e90fb8b15d32ba09bfd91d25 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Sat, 10 Apr 2021 13:07:07 -0500 Subject: [PATCH] style: Address clippy --- src/config.rs | 6 +++--- src/policy.rs | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/config.rs b/src/config.rs index b1e98f1..285009e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -456,7 +456,7 @@ mod test { let null = Config::default(); let defaulted = Config::from_defaults(); - let mut actual = null.clone(); + let mut actual = null; actual.update(&defaulted); assert_eq!(actual, defaulted); @@ -470,7 +470,7 @@ mod test { ..Default::default() }; - let mut actual = null.clone(); + let mut actual = null; actual.update(&extended); assert_eq!(actual, extended); @@ -487,7 +487,7 @@ mod test { ..Default::default() }; - let mut actual = base.clone(); + let mut actual = base; actual.update(&extended); let expected: Vec = vec!["*.foo".into(), "*.bar".into()]; diff --git a/src/policy.rs b/src/policy.rs index 780cccb..7393be0 100644 --- a/src/policy.rs +++ b/src/policy.rs @@ -405,7 +405,7 @@ mod test { let config = crate::config::Config { type_: maplit::hashmap! { - type_name.clone() => crate::config::TypeEngineConfig { + type_name => crate::config::TypeEngineConfig { ..Default::default() }, }, @@ -448,12 +448,11 @@ mod test { }, type_: maplit::hashmap! { type_name.clone() => crate::config::TypeEngineConfig { - extend_glob: vec![type_name.clone()], + extend_glob: vec![type_name], engine: crate::config::EngineConfig { binary: Some(false), ..Default::default() }, - ..Default::default() }, }, ..Default::default() @@ -481,12 +480,11 @@ mod test { }, type_: maplit::hashmap! { type_name.clone() => crate::config::TypeEngineConfig { - extend_glob: vec![type_name.clone()], + extend_glob: vec![type_name], engine: crate::config::EngineConfig { binary: Some(false), ..Default::default() }, - ..Default::default() }, }, ..Default::default()