From 0aef67f9ce4b41fc3f32530b99cbf509e79046cc Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 21 May 2024 21:48:44 +0200 Subject: [PATCH] Refactor to prepare for follow-on change --- crates/fj-core/src/validate/shell.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/fj-core/src/validate/shell.rs b/crates/fj-core/src/validate/shell.rs index 52e60533f..41632cfd0 100644 --- a/crates/fj-core/src/validate/shell.rs +++ b/crates/fj-core/src/validate/shell.rs @@ -30,6 +30,7 @@ impl Validate for Shell { ); errors.extend( ShellValidationError::check_half_edge_pairs(self, geometry) + .map(ShellValidationError::HalfEdgeHasNoSibling) .map(Into::into), ); ShellValidationError::check_half_edge_coincidence( @@ -78,7 +79,7 @@ impl ShellValidationError { fn check_half_edge_pairs<'r>( shell: &'r Shell, geometry: &'r Geometry, - ) -> impl Iterator + 'r { + ) -> impl Iterator + 'r { let mut unmatched_half_edges = BTreeMap::new(); for face in shell.faces() { @@ -118,9 +119,7 @@ impl ShellValidationError { unmatched_half_edges .into_values() .cloned() - .map(|half_edge| { - Self::HalfEdgeHasNoSibling(HalfEdgeHasNoSibling { half_edge }) - }) + .map(|half_edge| HalfEdgeHasNoSibling { half_edge }) } /// Check that non-sibling half-edges are not coincident