diff --git a/aoc2019/src/day06.rs b/aoc2019/src/day06.rs index f3a51d4..3d18bba 100644 --- a/aoc2019/src/day06.rs +++ b/aoc2019/src/day06.rs @@ -66,7 +66,7 @@ fn part2(input: &str) -> Result { }) .collect::>>()?; - let succ = |key: &String| orbits.get(key).map(|val| val.clone()); + let succ = |key: &String| orbits.get(key).cloned(); let you_path = iter::successors(Some("YOU".to_string()), succ).collect::>(); let santa_path = iter::successors(Some("SAN".to_string()), succ).collect::>();