clippy: fix lints
This commit is contained in:
parent
e01307eb3c
commit
e82df94852
7 changed files with 16 additions and 16 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue