From 2711e4c7fc8183bc5dd685dfa7cc3fc016711b6a Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 22 May 2024 20:06:53 +0200 Subject: [PATCH] Refactor to prepare for follow-on change --- crates/fj-core/src/validate/shell.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/fj-core/src/validate/shell.rs b/crates/fj-core/src/validate/shell.rs index a767f09ce..508edcc0e 100644 --- a/crates/fj-core/src/validate/shell.rs +++ b/crates/fj-core/src/validate/shell.rs @@ -32,9 +32,9 @@ impl Validate for Shell { errors.extend( HalfEdgeHasNoSibling::check(self, geometry, config).map(Into::into), ); - ShellValidationError::check_half_edge_coincidence( - self, geometry, config, errors, - ); + errors.extend(ShellValidationError::check_half_edge_coincidence( + self, geometry, config, + )); } } @@ -52,8 +52,9 @@ impl ShellValidationError { shell: &Shell, geometry: &Geometry, config: &ValidationConfig, - errors: &mut Vec, - ) { + ) -> impl Iterator { + let mut errors = Vec::new(); + let edges_and_surfaces = shell.all_half_edges_with_surface().collect::>(); @@ -115,6 +116,8 @@ impl ShellValidationError { } } } + + errors.into_iter() } }