Skip to content

Commit

Permalink
Extract variable to improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Apr 20, 2023
1 parent 3d8da18 commit 8947cc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/fj-kernel/src/validate/solid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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(),
Expand Down

0 comments on commit 8947cc9

Please sign in to comment.