Skip to content

Commit

Permalink
Clippy pass
Browse files Browse the repository at this point in the history
  • Loading branch information
juancampa committed Aug 10, 2024
1 parent 1e03351 commit 65b9ac3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions crates/epaint/src/tessellator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ fn stroke_path(
let bbox = Rect::from_points(
&path
.iter()
.map(|p| translate_stroke_point(p, &stroke).pos)
.map(|p| translate_stroke_point(p, stroke).pos)
.collect::<Vec<Pos2>>(),
)
.expand((stroke.width / 2.0) + feathering);
Expand Down Expand Up @@ -938,7 +938,7 @@ fn stroke_path(
let mut i0 = n - 1;
for i1 in 0..n {
let connect_with_previous = path_type == PathType::Closed || i1 > 0;
let p1 = translate_stroke_point(&path[i1 as usize], &stroke);
let p1 = translate_stroke_point(&path[i1 as usize], stroke);
let p = p1.pos;
let n = p1.normal;
out.colored_vertex(p + n * feathering, color_outer);
Expand Down Expand Up @@ -980,7 +980,7 @@ fn stroke_path(

let mut i0 = n - 1;
for i1 in 0..n {
let p1 = translate_stroke_point(&path[i1 as usize], &stroke);
let p1 = translate_stroke_point(&path[i1 as usize], stroke);
let p = p1.pos;
let n = p1.normal;
out.colored_vertex(p + n * outer_rad, color_outer);
Expand Down Expand Up @@ -1025,7 +1025,7 @@ fn stroke_path(
out.reserve_vertices(4 * n as usize);

{
let end = translate_stroke_point(&path[0], &stroke);
let end = translate_stroke_point(&path[0], stroke);
let p = end.pos;
let n = end.normal;
let back_extrude = n.rot90() * feathering;
Expand All @@ -1046,7 +1046,7 @@ fn stroke_path(

let mut i0 = 0;
for i1 in 1..n - 1 {
let point = translate_stroke_point(&path[i1 as usize], &stroke);
let point = translate_stroke_point(&path[i1 as usize], stroke);
let p = point.pos;
let n = point.normal;
out.colored_vertex(p + n * outer_rad, color_outer);
Expand Down Expand Up @@ -1074,7 +1074,7 @@ fn stroke_path(

{
let i1 = n - 1;
let end = translate_stroke_point(&path[i1 as usize], &stroke);
let end = translate_stroke_point(&path[i1 as usize], stroke);
let p = end.pos;
let n = end.normal;
let back_extrude = -n.rot90() * feathering;
Expand Down Expand Up @@ -1138,7 +1138,7 @@ fn stroke_path(
return;
}
}
for p in path.iter().map(|p| translate_stroke_point(p, &stroke)) {
for p in path.iter().map(|p| translate_stroke_point(p, stroke)) {
out.colored_vertex(
p.pos + radius * p.normal,
mul_color(
Expand All @@ -1156,7 +1156,7 @@ fn stroke_path(
}
} else {
let radius = stroke.width / 2.0;
for p in path.iter().map(|p| translate_stroke_point(p, &stroke)) {
for p in path.iter().map(|p| translate_stroke_point(p, stroke)) {
out.colored_vertex(
p.pos + radius * p.normal,
get_color(&stroke.color, p.pos + radius * p.normal),
Expand Down

0 comments on commit 65b9ac3

Please sign in to comment.