From 285c86f20076a31857f300b06405ddb6de6d7505 Mon Sep 17 00:00:00 2001 From: A-Walrus Date: Mon, 20 Mar 2023 09:09:06 +0200 Subject: [PATCH] Cleanup and make clippy happy --- crates/fj-kernel/src/validate/mod.rs | 2 +- crates/fj-kernel/src/validate/shell.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/fj-kernel/src/validate/mod.rs b/crates/fj-kernel/src/validate/mod.rs index 2837eddc8f..d7a8c19c88 100644 --- a/crates/fj-kernel/src/validate/mod.rs +++ b/crates/fj-kernel/src/validate/mod.rs @@ -24,7 +24,7 @@ macro_rules! assert_contains_err { assert!({ let mut errors = Vec::new(); $o.validate(&mut errors); - errors.iter().find(|e| matches!(e, $p)).is_some() + errors.iter().any(|e| matches!(e, $p)) }) }; } diff --git a/crates/fj-kernel/src/validate/shell.rs b/crates/fj-kernel/src/validate/shell.rs index 1996348139..7d43ba34bb 100644 --- a/crates/fj-kernel/src/validate/shell.rs +++ b/crates/fj-kernel/src/validate/shell.rs @@ -34,7 +34,7 @@ pub enum ShellValidationError { Edge 2: {1:#?} " )] - CoincidentEdgesNotIdentical(HalfEdge, HalfEdge), + CoincidentEdgesNotIdentical(Handle, Handle), } /// Check whether to [`HalfEdge`]s are coincident. Along with the edges you @@ -106,8 +106,8 @@ impl ShellValidationError { { errors.push( Self::CoincidentEdgesNotIdentical( - edge.0.clone_object(), - other_edge.0.clone_object(), + edge.0.clone(), + other_edge.0.clone(), ) .into(), ) @@ -134,7 +134,7 @@ impl ShellValidationError { } // Each global edge should have exactly two half edges that are part of the shell - if half_edge_to_faces.iter().find(|(_, c)| **c != 2).is_some() { + if half_edge_to_faces.iter().any(|(_, c)| *c != 2) { errors.push(Self::NotWatertight.into()) } }