clippy: fix lints

This commit is contained in:
Antoine Martin 2021-11-25 16:23:22 +01:00
parent e01307eb3c
commit e82df94852
7 changed files with 16 additions and 16 deletions

View file

@ -48,7 +48,7 @@ fn part2(first_wire: &Wire, second_wire: &Wire) -> Result<u64> {
let mut second_length = 0;
for seg2 in &second_wire.0 {
if let Some(inter) = seg1.intersection(&seg2) {
if let Some(inter) = seg1.intersection(seg2) {
if inter.x == 0 && inter.y == 0 {
continue;
}

View file

@ -49,7 +49,7 @@ fn part1(input: &str) -> Result<u64> {
let mut cache = HashMap::new();
Ok(orbits
.keys()
.map(|k| count_orbits(&k, &orbits, &mut cache))
.map(|k| count_orbits(k, &orbits, &mut cache))
.sum())
}