mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-27 05:40:32 +01:00
Change signature for solution.
This commit is contained in:
@@ -72,7 +72,7 @@ impl Day23 {
|
||||
Default::default()
|
||||
}
|
||||
|
||||
fn read_input(&mut self, input: &mut Read) {
|
||||
fn read_input(&mut self, input: &mut dyn Read) {
|
||||
let matcher = Regex::new(r"-?\d+").unwrap();
|
||||
let reader = BufReader::new(input);
|
||||
|
||||
@@ -92,7 +92,7 @@ impl Day23 {
|
||||
}
|
||||
|
||||
impl Solution for Day23 {
|
||||
fn part1(&mut self, input: &mut Read) -> String {
|
||||
fn part1(&mut self, input: &mut dyn Read) -> String {
|
||||
self.read_input(input);
|
||||
self.bots.sort_unstable();
|
||||
let (best_range, best_pos) = *self.bots.last().unwrap();
|
||||
@@ -106,7 +106,7 @@ impl Solution for Day23 {
|
||||
result.to_string()
|
||||
}
|
||||
|
||||
fn part2(&mut self, input: &mut Read) -> String {
|
||||
fn part2(&mut self, input: &mut dyn Read) -> String {
|
||||
self.read_input(input);
|
||||
let mut neighbours = vec![HashSet::new(); self.bots.len()];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user