Skip to content

Commit

Permalink
Cleanup and make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Walrus committed Mar 20, 2023
1 parent 8982c96 commit 285c86f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/fj-kernel/src/validate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
};
}
Expand Down
8 changes: 4 additions & 4 deletions crates/fj-kernel/src/validate/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub enum ShellValidationError {
Edge 2: {1:#?}
"
)]
CoincidentEdgesNotIdentical(HalfEdge, HalfEdge),
CoincidentEdgesNotIdentical(Handle<HalfEdge>, Handle<HalfEdge>),
}

/// Check whether to [`HalfEdge`]s are coincident. Along with the edges you
Expand Down Expand Up @@ -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(),
)
Expand All @@ -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())
}
}
Expand Down

0 comments on commit 285c86f

Please sign in to comment.