From 2dd5f6d68d3a26463b874634c2317e688f1c8428 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 9 Nov 2022 14:25:46 +0100 Subject: [PATCH] Use public API in `PartialFace` method --- crates/fj-kernel/src/partial/objects/face.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/crates/fj-kernel/src/partial/objects/face.rs b/crates/fj-kernel/src/partial/objects/face.rs index 60061ff48..87cf3bb23 100644 --- a/crates/fj-kernel/src/partial/objects/face.rs +++ b/crates/fj-kernel/src/partial/objects/face.rs @@ -82,18 +82,14 @@ impl PartialFace { /// Build the [`Face`] with an interior polygon from the provided points pub fn with_interior_polygon_from_points( - mut self, + self, points: impl IntoIterator>>, ) -> Self { let surface = self.surface().expect("Need surface to build polygon."); - self.interiors.push( - Cycle::partial() - .with_poly_chain_from_points(surface, points) - .close_with_line_segment() - .into(), - ); - self + self.with_interiors([Cycle::partial() + .with_poly_chain_from_points(surface, points) + .close_with_line_segment()]) } /// Build the [`Face`] with the provided color