From 8947cc946f89c067648d1e5a0ffdb6aafa92329a Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Thu, 20 Apr 2023 09:46:23 +0200 Subject: [PATCH] Extract variable to improve readability --- crates/fj-kernel/src/validate/solid.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/fj-kernel/src/validate/solid.rs b/crates/fj-kernel/src/validate/solid.rs index bd5d5a307..9dff3630f 100644 --- a/crates/fj-kernel/src/validate/solid.rs +++ b/crates/fj-kernel/src/validate/solid.rs @@ -90,6 +90,8 @@ impl SolidValidationError { for (position_a, vertex_a) in &vertices { for (position_b, vertex_b) in &vertices { let vertices_are_identical = vertex_a.id() == vertex_b.id(); + let vertices_are_not_identical = !vertices_are_identical; + let too_far_to_be_identical = position_a .distance_to(position_b) > config.identical_max_distance; @@ -109,7 +111,7 @@ impl SolidValidationError { ) } - if !vertices_are_identical && too_close_to_be_distinct { + if vertices_are_not_identical && too_close_to_be_distinct { errors.push( Self::DistinctVerticesCoincide { vertex_a: vertex_a.clone(),