Skip to content

Commit

Permalink
Match reference to avoid dereferencing twice
Browse files Browse the repository at this point in the history
  • Loading branch information
julianschuler committed Feb 18, 2025
1 parent 5b17a07 commit e50e1cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ransac/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl<Frame> RansacFeature<Frame> {
{
unused_points
.into_iter()
.filter(|point| self.squared_distance_to(**point) <= maximum_score_distance_squared)
.filter(|&point| self.squared_distance_to(*point) <= maximum_score_distance_squared)
.map(|point| 1.0 - self.distance_to(*point) / maximum_score_distance)
.sum()
}
Expand Down

0 comments on commit e50e1cf

Please sign in to comment.