|
|
@ -59,7 +59,7 @@ impl<'a> Day09<'a> {
|
|
|
|
|
|
|
|
|
|
|
|
fn routes(&self) -> Vec<Route> {
|
|
|
|
fn routes(&self) -> Vec<Route> {
|
|
|
|
let mut locations = self.locations.iter()
|
|
|
|
let mut locations = self.locations.iter()
|
|
|
|
.map(|l| l.clone())
|
|
|
|
.cloned()
|
|
|
|
.collect::<Vec<Location>>();
|
|
|
|
.collect::<Vec<Location>>();
|
|
|
|
let heap = Heap::new(&mut locations);
|
|
|
|
let heap = Heap::new(&mut locations);
|
|
|
|
heap.map(|p| self.route(p)).collect()
|
|
|
|
heap.map(|p| self.route(p)).collect()
|
|
|
|