From 6830e921d9451b120a516bdb643eb0a417d78460 Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Sun, 5 Dec 2021 13:59:27 +0100 Subject: Get rid of stupid helper module. Was tired, wrote bad code. --- src/day3.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/day3.rs') 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 + Clone + 'a> ClonableIterator<'a> for T { Box::new(self.clone()) } } -mod helper { - impl<'a> Clone for Box> { - fn clone(&self) -> Self { - (*self).box_clone() - } + +impl<'a> Clone for Box> { + fn clone(&self) -> Self { + self.as_ref().box_clone() } } -- cgit v1.2.3