diff options
author | Andreas Grois <andi@grois.info> | 2021-12-05 13:59:27 +0100 |
---|---|---|
committer | Andreas Grois <andi@grois.info> | 2021-12-05 13:59:27 +0100 |
commit | 6830e921d9451b120a516bdb643eb0a417d78460 (patch) | |
tree | bf7a3f51963b2d9b021faa117c8ac77003973667 /src/day3.rs | |
parent | 1fef1d907fd313c94904a08f2a5c7fc158550a50 (diff) |
Get rid of stupid helper module. Was tired, wrote bad code.
Diffstat (limited to 'src/day3.rs')
-rw-r--r-- | src/day3.rs | 9 |
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() } } |