From 2be1fea6eb4088db3b57d419dbcdb04c5a136bcf Mon Sep 17 00:00:00 2001 From: Mahmoud Almontasser Date: Sat, 9 Nov 2024 00:53:33 +0200 Subject: [PATCH] Fix a typo in distance_along Fixing the initial value of traversed in distance_along. It should be 0f64 instead of 06f64. --- common/ferrostar/src/algorithms.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/ferrostar/src/algorithms.rs b/common/ferrostar/src/algorithms.rs index 7f9f7b15..9f446d6f 100644 --- a/common/ferrostar/src/algorithms.rs +++ b/common/ferrostar/src/algorithms.rs @@ -353,7 +353,7 @@ fn distance_along(point: &Point, linestring: &LineString) -> Option { } let (_, _, traversed) = linestring.lines().try_fold( - (0f64, f64::INFINITY, 06f64), + (0f64, f64::INFINITY, 0f64), |(cum_length, closest_dist_to_point, traversed), segment| { // Convert to a LineString so we get haversine ops let segment_linestring = LineString::from(segment);