cleanup
This commit is contained in:
@@ -37,9 +37,6 @@ impl Rucksack {
|
|||||||
}
|
}
|
||||||
panic!("Common item not found");
|
panic!("Common item not found");
|
||||||
}
|
}
|
||||||
fn contains(&self, item: &u8) -> bool {
|
|
||||||
self.compartments().into_iter().flatten().contains(item)
|
|
||||||
}
|
|
||||||
fn common_with<'a>(&self, other: &[u8]) -> impl Iterator<Item = u8> {
|
fn common_with<'a>(&self, other: &[u8]) -> impl Iterator<Item = u8> {
|
||||||
self.compartments()
|
self.compartments()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use std::{io::BufRead, ops::RangeInclusive};
|
use std::ops::RangeInclusive;
|
||||||
|
|
||||||
use aoc_runner_derive::{aoc, aoc_generator};
|
use aoc_runner_derive::{aoc, aoc_generator};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user