|
|
|
@ -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(),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|