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(|| { 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()