day(23): fix clippy
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
9a990dc83a
commit
db381143a2
1 changed files with 3 additions and 5 deletions
|
@ -133,11 +133,9 @@ impl Day23 {
|
||||||
let distance = missing.then(|| {
|
let distance = missing.then(|| {
|
||||||
edges
|
edges
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|e| {
|
.filter(|&e| e.start == u)
|
||||||
(e.start == u).then(|| {
|
.map(|e| {
|
||||||
e.distance as isize
|
e.distance as isize + longest_path(cache, edges, goal, e.end, visited | u)
|
||||||
+ longest_path(cache, edges, goal, e.end, visited | u)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
.max()
|
.max()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
|
Loading…
Reference in a new issue