Skip to content

Commit

Permalink
Remove redundant code
Browse files Browse the repository at this point in the history
The curve merging/replacement is already done in
`PartialHalfEdge::build`.
  • Loading branch information
hannobraun committed Nov 16, 2022
1 parent 33ece82 commit a8919a5
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions crates/fj-kernel/src/algorithms/transform/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,15 @@ impl TransformObject for PartialHalfEdge {
objects: &Objects,
) -> Result<Self, ValidationError> {
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,
})
}
}
Expand Down

0 comments on commit a8919a5

Please sign in to comment.