diff --git a/day3/src/main.rs b/day3/src/main.rs index 7aec75a..6c52d37 100644 --- a/day3/src/main.rs +++ b/day3/src/main.rs @@ -31,11 +31,11 @@ fn init() -> eyre::Result<()> color_eyre::install() } -#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)] +#[derive(Debug, Clone, PartialEq, Eq)] //TODO: implement PartialEq, Eq, PartialOrd, Ord via intersection between `full`s struct Sack { split_by: usize, containers: Vec>, - full: BTreeSet, + full: smallmap::Set, //TODO: When doing the above ^, change to BTreeSet for `intersection()` } impl Sack @@ -80,7 +80,7 @@ impl std::str::FromStr for Sack first.chars().collect(), second.chars().collect(), ], - full: s.chars().collect(), + full: s.chars().map(|a| (a, ())).collect(), }) } }