From a19c5908916b0fdce72d8d632a1b3391ff08ae1e Mon Sep 17 00:00:00 2001 From: Evgeny Grigorenko Date: Sat, 28 Sep 2024 20:05:54 +0400 Subject: [PATCH] fix: replace `partial_cmp` with `total_cmp` in sorting --- geo/src/algorithm/interior_point.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geo/src/algorithm/interior_point.rs b/geo/src/algorithm/interior_point.rs index 16045c71b..7f34c905e 100644 --- a/geo/src/algorithm/interior_point.rs +++ b/geo/src/algorithm/interior_point.rs @@ -210,7 +210,7 @@ fn polygon_interior_point_with_segment_length( let midpoint = Point::new((start.x + end.x) / two, y_mid); segments.push((midpoint, length)); } - segments.sort_by(|a, b| b.1.partial_cmp(&a.1).unwrap_or(Ordering::Less)); + segments.sort_by(|a, b| b.1.total_cmp(&a.1)); for (midpoint, segment_length) in segments { // some pairs of consecutive points traveling east-west will bound segments inside the