From f0d799b89a895fe766160f67b42720c3da28760b Mon Sep 17 00:00:00 2001 From: Rory McCann Date: Wed, 13 Feb 2019 14:16:30 +0100 Subject: [PATCH] Construct MultiPolygon from Vec of things that is Into --- geo-types/src/multi_polygon.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/geo-types/src/multi_polygon.rs b/geo-types/src/multi_polygon.rs index 608a522f1..1f77d747d 100644 --- a/geo-types/src/multi_polygon.rs +++ b/geo-types/src/multi_polygon.rs @@ -18,6 +18,13 @@ impl>> From for MultiPolygon { } } +impl>> From> for MultiPolygon { + fn from(x: Vec) -> Self { + MultiPolygon(x.into_iter().map(|p| p.into()).collect()) + } +} + + impl>> FromIterator for MultiPolygon { fn from_iter>(iter: I) -> Self { MultiPolygon(iter.into_iter().map(|p| p.into()).collect())