1
0
Fork 0

day(23): fix clippy

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-07-07 20:26:54 +02:00
parent 9a990dc83a
commit db381143a2
Signed by: mfocko
SSH key fingerprint: SHA256:5YXD7WbPuK60gxnG6DjAwJiS9+swoWj33/HFu8g8JVo

View file

@ -133,11 +133,9 @@ impl Day23 {
let distance = missing.then(|| {
edges
.iter()
.filter_map(|e| {
(e.start == u).then(|| {
e.distance as isize
+ longest_path(cache, edges, goal, e.end, visited | u)
})
.filter(|&e| e.start == u)
.map(|e| {
e.distance as isize + longest_path(cache, edges, goal, e.end, visited | u)
})
.max()
.unwrap()