From 460084d11c3d8c766532019abe3cbbc66264b604 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 18 Feb 2025 20:06:18 +0100 Subject: [PATCH] Simplify return value of `ConnectExt::connect` --- experiments/2024-12-09/src/topology/connect.rs | 7 +++---- experiments/2024-12-09/src/topology/sweep.rs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/experiments/2024-12-09/src/topology/connect.rs b/experiments/2024-12-09/src/topology/connect.rs index 11c671da3..0843766af 100644 --- a/experiments/2024-12-09/src/topology/connect.rs +++ b/experiments/2024-12-09/src/topology/connect.rs @@ -22,11 +22,11 @@ pub trait ConnectExt { /// /// It should be seen as more of a placeholder for a real implementation of /// this operation. - fn connect(self, other: Self) -> Handle; + fn connect(self, other: Self) -> Solid; } impl ConnectExt for Handle { - fn connect(self, other: Self) -> Handle { + fn connect(self, other: Self) -> Solid { assert_eq!( self.output().vertices().count(), other.output().vertices().count(), @@ -49,7 +49,6 @@ impl ConnectExt for Handle { }) .collect::>(); - let output = Solid::new([self, other].into_iter().chain(side_faces)); - Handle::new(output) + Solid::new([self, other].into_iter().chain(side_faces)) } } diff --git a/experiments/2024-12-09/src/topology/sweep.rs b/experiments/2024-12-09/src/topology/sweep.rs index ca0a8712d..e5eb24848 100644 --- a/experiments/2024-12-09/src/topology/sweep.rs +++ b/experiments/2024-12-09/src/topology/sweep.rs @@ -37,7 +37,7 @@ impl SweepExt for Handle { } pub struct Sweep { - pub output: Handle, + pub output: Solid, } impl Operation for Sweep {