Skip to content

Commit aed06ea

Browse files
committed
More collect fixes
1 parent 0d2b551 commit aed06ea

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

geo/src/algorithm/euclidean_distance.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -586,18 +586,8 @@ pub fn nearest_neighbour_distance<T>(geom1: &LineString<T>, geom2: &LineString<T
586586
where
587587
T: GeoFloat + RTreeNum,
588588
{
589-
let tree_a = RTree::bulk_load(
590-
geom1
591-
.lines()
592-
.map(CachedEnvelope::new)
593-
.collect(),
594-
);
595-
let tree_b = RTree::bulk_load(
596-
geom2
597-
.lines()
598-
.map(CachedEnvelope::new)
599-
.collect::<Vec<_>>(),
600-
);
589+
let tree_a = RTree::bulk_load(geom1.lines().map(CachedEnvelope::new).collect());
590+
let tree_b = RTree::bulk_load(geom2.lines().map(CachedEnvelope::new).collect());
601591
// Return minimum distance between all geom a points and geom b lines, and all geom b points and geom a lines
602592
geom2
603593
.points()

0 commit comments

Comments
 (0)