From 7029372c9fada6316852915765cc0d763be3c63c Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 10 Nov 2024 16:02:48 -0700 Subject: clippy moment --- src/makefile/target.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/makefile/target.rs') diff --git a/src/makefile/target.rs b/src/makefile/target.rs index c3431e4..d6fac2c 100644 --- a/src/makefile/target.rs +++ b/src/makefile/target.rs @@ -22,7 +22,7 @@ pub struct Target { } impl Target { - pub fn extend(&mut self, other: Target) { + pub fn extend(&mut self, other: Self) { assert_eq!(&self.name, &other.name); match (self.commands.is_empty(), other.commands.is_empty()) { (false, false) => { @@ -154,9 +154,9 @@ impl StaticTargetSet { } } -impl Into> for StaticTargetSet { - fn into(self) -> HashMap { - self.data +impl From for HashMap { + fn from(value: StaticTargetSet) -> Self { + value.data } } @@ -168,7 +168,7 @@ pub struct DynamicTargetSet { impl DynamicTargetSet { pub fn get(&self, name: &str) -> Option>> { - self.data.borrow().get(name).map(|x| Rc::clone(x)) + self.data.borrow().get(name).map(Rc::clone) } pub fn put(&self, target: Target) { -- cgit v1.2.3