Skip to content

Commit

Permalink
clippy(allow)
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscorn committed Feb 1, 2024
1 parent ad217a0 commit c1b775b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ impl<T: Float> Earcut<T> {
}

/// main ear slicing loop which triangulates a polygon (given as a linked list)
#[allow(clippy::too_many_arguments)]
fn earcut_linked<N: Index>(
&mut self,
ear_i: usize,
Expand Down Expand Up @@ -1019,6 +1020,7 @@ fn z_order<T: Float>(x: T, y: T, min_x: T, min_y: T, inv_size: T) -> u32 {
}

#[inline(always)]
#[allow(clippy::too_many_arguments)]
fn point_in_triangle<T: Float>(ax: T, ay: T, bx: T, by: T, cx: T, cy: T, px: T, py: T) -> bool {
(cx - px) * (ay - py) >= (ax - px) * (cy - py)
&& (ax - px) * (by - py) >= (bx - px) * (ay - py)
Expand Down
2 changes: 1 addition & 1 deletion tests/fixture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn test_fixture(name: &str, num_triangles: usize, expected_deviation: f64) {

// check
assert!(triangles.len() == num_triangles * 3);
if triangles.len() > 0 {
if !triangles.is_empty() {
assert!(deviation(&data, &hole_indices, 2, &triangles) <= expected_deviation);
}
}
Expand Down

0 comments on commit c1b775b

Please sign in to comment.