From a8919a5a62dc8372cff5b5fa1fb78a2ef8b3e78a Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 16 Nov 2022 14:14:44 +0100 Subject: [PATCH] Remove redundant code The curve merging/replacement is already done in `PartialHalfEdge::build`. --- .../src/algorithms/transform/edge.rs | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/crates/fj-kernel/src/algorithms/transform/edge.rs b/crates/fj-kernel/src/algorithms/transform/edge.rs index c9557c45f..0b7717268 100644 --- a/crates/fj-kernel/src/algorithms/transform/edge.rs +++ b/crates/fj-kernel/src/algorithms/transform/edge.rs @@ -16,24 +16,15 @@ impl TransformObject for PartialHalfEdge { objects: &Objects, ) -> Result { let curve = self.curve.transform(transform, objects)?; - let vertices = self.vertices.try_map_ext( - |vertex| -> Result<_, ValidationError> { - let mut vertex = - vertex.into_partial().transform(transform, objects)?; - vertex.curve = curve.clone(); - Ok(vertex) - }, - )?; - let mut global_form = self - .global_form - .into_partial() - .transform(transform, objects)?; - global_form.curve = curve.global_form(); + let vertices = self + .vertices + .try_map_ext(|vertex| vertex.transform(transform, objects))?; + let global_form = self.global_form.transform(transform, objects)?; Ok(Self { curve, - vertices: vertices.map(Into::into), - global_form: global_form.into(), + vertices, + global_form, }) } }