diff --git a/Cargo.toml b/Cargo.toml index 28c7a5cfa02..852aeed9cf1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -163,7 +163,6 @@ cargo_common_metadata = { level = "allow", priority = 1 } # style-lints: doc_lazy_continuation = { level = "allow", priority = 1 } needless_return = { level = "allow", priority = 1 } -unnecessary_map_or = { level = "allow", priority = 1 } # complexity-lints needless_lifetimes = { level = "allow", priority = 1 } precedence = { level = "allow", priority = 1 } diff --git a/src/graph/astar.rs b/src/graph/astar.rs index e2ae5032da2..a4244c87b8b 100644 --- a/src/graph/astar.rs +++ b/src/graph/astar.rs @@ -62,7 +62,7 @@ pub fn astar + Zero>( let real_weight = real_weight + weight; if weights .get(&next) - .map_or(true, |&weight| real_weight < weight) + .is_none_or(|&weight| real_weight < weight) { // current allows us to reach next with lower weight (or at all) // add next to the front