Changed `full` to smallmap::Set<char> since BTreeSet<char> since we aren"t doing part2

Fortune for day3's current commit: Middle blessing − 中吉
day14-cpp
Avril 2 years ago
parent 57bb493815
commit 2ec0a5ba7a
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -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<BTreeSet<char>>,
full: BTreeSet<char>,
full: smallmap::Set<char>, //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(),
})
}
}

Loading…
Cancel
Save