From afa79e48f483bcf393559ce2dd1925c6008e681b Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 22 May 2023 11:20:38 +0200 Subject: [PATCH] Make `Region::new` more convenient to call --- crates/fj-kernel/src/geometry/region.rs | 4 ++-- crates/fj-kernel/src/objects/full/face.rs | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/fj-kernel/src/geometry/region.rs b/crates/fj-kernel/src/geometry/region.rs index 7731a44c0..e854408eb 100644 --- a/crates/fj-kernel/src/geometry/region.rs +++ b/crates/fj-kernel/src/geometry/region.rs @@ -28,12 +28,12 @@ impl Region { /// Construct an instance of `Region` pub fn new( exterior: Handle, - interiors: Vec>, + interiors: impl IntoIterator>, color: Option, ) -> Self { Self { exterior, - interiors, + interiors: interiors.into_iter().collect(), color, } } diff --git a/crates/fj-kernel/src/objects/full/face.rs b/crates/fj-kernel/src/objects/full/face.rs index 2dd26e6da..8a824b02a 100644 --- a/crates/fj-kernel/src/objects/full/face.rs +++ b/crates/fj-kernel/src/objects/full/face.rs @@ -47,8 +47,6 @@ impl Face { interiors: impl IntoIterator>, color: Option, ) -> Self { - let interiors = interiors.into_iter().collect(); - Self { surface, region: Region::new(exterior, interiors, color),