From 4a90bee104c8a1b27be265e34ab9fc97145c51fb Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Sat, 2 Jan 2016 21:47:45 -0800 Subject: [PATCH] [rust] Get rid of unnecessary clone()s in Day 3 --- rust/src/day_03.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/src/day_03.rs b/rust/src/day_03.rs index 8dbe942..c64e2ec 100644 --- a/rust/src/day_03.rs +++ b/rust/src/day_03.rs @@ -73,8 +73,8 @@ impl<'a> Iterator for Santa<'a> { Some('<') => Point { x: -1, y: 0 }, _ => return None, }; - self.location = self.location.clone() + offset; - Some(self.location.clone()) + self.location = self.location + offset; + Some(self.location) } }