diff --git a/crates/fj-kernel/src/algorithms/transform/edge.rs b/crates/fj-kernel/src/algorithms/transform/edge.rs index 265baa084..3a9bc69e8 100644 --- a/crates/fj-kernel/src/algorithms/transform/edge.rs +++ b/crates/fj-kernel/src/algorithms/transform/edge.rs @@ -32,8 +32,7 @@ impl TransformObject for PartialHalfEdge { .global_form() .into_partial() .transform(transform, objects)? - .with_curve(curve.global_form()) - .into(); + .with_curve(curve.global_form()); Ok(Self::default() .with_curve(curve) diff --git a/crates/fj-kernel/src/builder/shell.rs b/crates/fj-kernel/src/builder/shell.rs index 59007984d..9c6d1629b 100644 --- a/crates/fj-kernel/src/builder/shell.rs +++ b/crates/fj-kernel/src/builder/shell.rs @@ -89,7 +89,7 @@ impl<'a> ShellBuilder<'a> { .zip(&surfaces) .map(|(half_edge, surface)| { HalfEdge::partial() - .with_global_form(Some(half_edge.global_form().clone())) + .with_global_form(half_edge.global_form().clone()) .update_as_line_segment_from_points( surface.clone(), [[Z, Z], [edge_length, Z]], @@ -252,7 +252,7 @@ impl<'a> ShellBuilder<'a> { edges.push( HalfEdge::partial() .with_vertices(vertices) - .with_global_form(Some(edge.global_form().clone())) + .with_global_form(edge.global_form().clone()) .update_as_line_segment() .build(self.objects) .unwrap(), diff --git a/crates/fj-kernel/src/partial/objects/edge.rs b/crates/fj-kernel/src/partial/objects/edge.rs index 19161235f..02c60af4b 100644 --- a/crates/fj-kernel/src/partial/objects/edge.rs +++ b/crates/fj-kernel/src/partial/objects/edge.rs @@ -107,11 +107,10 @@ impl PartialHalfEdge { /// Update the partial half-edge with the given global form pub fn with_global_form( mut self, - global_form: Option>>, + global_form: impl Into>, ) -> Self { - if let Some(global_form) = global_form { - self.global_form = global_form.into(); - } + self.global_form = global_form.into(); + self }