Skip to content

Commit c43c518

Browse files
authored
style: include unnecessary_map_or (#872)
1 parent e55f1bb commit c43c518

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ cargo_common_metadata = { level = "allow", priority = 1 }
163163
# style-lints:
164164
doc_lazy_continuation = { level = "allow", priority = 1 }
165165
needless_return = { level = "allow", priority = 1 }
166-
unnecessary_map_or = { level = "allow", priority = 1 }
167166
# complexity-lints
168167
needless_lifetimes = { level = "allow", priority = 1 }
169168
precedence = { level = "allow", priority = 1 }

src/graph/astar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub fn astar<V: Ord + Copy, E: Ord + Copy + Add<Output = E> + Zero>(
6262
let real_weight = real_weight + weight;
6363
if weights
6464
.get(&next)
65-
.map_or(true, |&weight| real_weight < weight)
65+
.is_none_or(|&weight| real_weight < weight)
6666
{
6767
// current allows us to reach next with lower weight (or at all)
6868
// add next to the front

0 commit comments

Comments
 (0)