From 32903edf301d19d806308f458ba7bebce04862ec Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 4 Nov 2022 12:11:37 +0100 Subject: [PATCH] Make method more convenient to call --- crates/fj-kernel/src/builder/cycle.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/fj-kernel/src/builder/cycle.rs b/crates/fj-kernel/src/builder/cycle.rs index 5d5a62e87..04251a2fc 100644 --- a/crates/fj-kernel/src/builder/cycle.rs +++ b/crates/fj-kernel/src/builder/cycle.rs @@ -12,7 +12,7 @@ pub trait CycleBuilder { /// Update the partial cycle with a polygonal chain from the provided points fn with_poly_chain( self, - vertices: impl IntoIterator>, + vertices: impl IntoIterator>>, ) -> Self; /// Update the partial cycle with a polygonal chain from the provided points @@ -30,8 +30,10 @@ pub trait CycleBuilder { impl CycleBuilder for PartialCycle { fn with_poly_chain( self, - vertices: impl IntoIterator>, + vertices: impl IntoIterator>>, ) -> Self { + let vertices = vertices.into_iter().map(Into::into); + let iter = self .half_edges() .last() @@ -100,9 +102,7 @@ impl CycleBuilder for PartialCycle { points: impl IntoIterator>>, ) -> Self { self.with_poly_chain(points.into_iter().map(|position| { - SurfaceVertex::partial() - .with_position(Some(position)) - .into() + SurfaceVertex::partial().with_position(Some(position)) })) }