aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/day3.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/day3.rs b/src/day3.rs
index 474eb73..0d9bd4d 100644
--- a/src/day3.rs
+++ b/src/day3.rs
@@ -34,11 +34,10 @@ impl<'a, T: Iterator<Item = &'a u32> + Clone + 'a> ClonableIterator<'a> for T {
Box::new(self.clone())
}
}
-mod helper {
- impl<'a> Clone for Box<dyn super::ClonableIterator<'a>> {
- fn clone(&self) -> Self {
- (*self).box_clone()
- }
+
+impl<'a> Clone for Box<dyn ClonableIterator<'a>> {
+ fn clone(&self) -> Self {
+ self.as_ref().box_clone()
}
}