Skip to content

Commit

Permalink
Fix clippy::unnecessary_map_or lint
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Jan 10, 2025
1 parent 64ce3d3 commit fda3070
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/query/contact/contact_composite_shape_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ where
if let Ok(Some(mut c)) =
dispatcher.contact(&part_pos1.inv_mul(pos12), part1, g2, prediction)
{
let replace = res.map_or(true, |cbest| c.dist < cbest.dist);
let replace = res.is_none_or(|cbest| c.dist < cbest.dist);

if replace {
if let Some(part_pos1) = part_pos1 {
Expand Down

0 comments on commit fda3070

Please sign in to comment.