diff options
Diffstat (limited to 'src/makefile/target.rs')
-rw-r--r-- | src/makefile/target.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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<HashMap<String, Target>> for StaticTargetSet { - fn into(self) -> HashMap<String, Target> { - self.data +impl From<StaticTargetSet> for HashMap<String, Target> { + fn from(value: StaticTargetSet) -> Self { + value.data } } @@ -168,7 +168,7 @@ pub struct DynamicTargetSet { impl DynamicTargetSet { pub fn get(&self, name: &str) -> Option<Rc<RefCell<Target>>> { - self.data.borrow().get(name).map(|x| Rc::clone(x)) + self.data.borrow().get(name).map(Rc::clone) } pub fn put(&self, target: Target) { |