From ab8b84eddbb2959f228fc574caa4a93d13b6fc92 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 9 Feb 2024 11:34:16 +0100 Subject: [PATCH 1/4] Refactor to improve clarity --- crates/fj-core/src/operations/sweep/face.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/fj-core/src/operations/sweep/face.rs b/crates/fj-core/src/operations/sweep/face.rs index ac33f810b..b6f5796c5 100644 --- a/crates/fj-core/src/operations/sweep/face.rs +++ b/crates/fj-core/src/operations/sweep/face.rs @@ -49,13 +49,14 @@ impl SweepFace for Handle { let mut faces = Vec::new(); let bottom_face = self.clone(); - faces.push(bottom_face.clone()); let other_faces = bottom_face .region() .sweep_region(bottom_face.surface(), path, cache, core) .all_faces() .map(|side_face| side_face.insert(&mut core.services)); + + faces.push(bottom_face.clone()); faces.extend(other_faces); Shell::new(faces) From f6de5290c9851775881206c12d8f07222a727c13 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 9 Feb 2024 11:35:37 +0100 Subject: [PATCH 2/4] Remove unnecessary `clone` --- crates/fj-core/src/operations/sweep/face.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/fj-core/src/operations/sweep/face.rs b/crates/fj-core/src/operations/sweep/face.rs index b6f5796c5..f01afc1ee 100644 --- a/crates/fj-core/src/operations/sweep/face.rs +++ b/crates/fj-core/src/operations/sweep/face.rs @@ -48,7 +48,7 @@ impl SweepFace for Handle { let mut faces = Vec::new(); - let bottom_face = self.clone(); + let bottom_face = self; let other_faces = bottom_face .region() From 595f63f07d8ce92e608323c117b7bf4783e8943d Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 9 Feb 2024 11:52:02 +0100 Subject: [PATCH 3/4] Refactor to improve clarity --- crates/fj-core/src/operations/sweep/face.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/fj-core/src/operations/sweep/face.rs b/crates/fj-core/src/operations/sweep/face.rs index f01afc1ee..6cd0774b9 100644 --- a/crates/fj-core/src/operations/sweep/face.rs +++ b/crates/fj-core/src/operations/sweep/face.rs @@ -46,8 +46,6 @@ impl SweepFace for Handle { let path = path.into(); - let mut faces = Vec::new(); - let bottom_face = self; let other_faces = bottom_face @@ -56,6 +54,7 @@ impl SweepFace for Handle { .all_faces() .map(|side_face| side_face.insert(&mut core.services)); + let mut faces = Vec::new(); faces.push(bottom_face.clone()); faces.extend(other_faces); From 95c2a68288a8d058b7ffec4c123eb1c1618c4dde Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 9 Feb 2024 11:52:14 +0100 Subject: [PATCH 4/4] Improve formatting --- crates/fj-core/src/operations/sweep/face.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/fj-core/src/operations/sweep/face.rs b/crates/fj-core/src/operations/sweep/face.rs index 6cd0774b9..68d4a44d4 100644 --- a/crates/fj-core/src/operations/sweep/face.rs +++ b/crates/fj-core/src/operations/sweep/face.rs @@ -47,7 +47,6 @@ impl SweepFace for Handle { let path = path.into(); let bottom_face = self; - let other_faces = bottom_face .region() .sweep_region(bottom_face.surface(), path, cache, core)