Skip to content

Commit

Permalink
Fix clippy::manual_slice_fill lints (#816)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Feb 10, 2025
1 parent 209d96f commit 178d295
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions vello_shaders/src/cpu/fine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,8 @@ fn fine_main(
let mut area = vec![0.0_f32; TILE_SIZE];
let mut rgba = vec![[0.0_f32; 4]; TILE_SIZE];
for tile_ix in 0..n_tiles {
for x in &mut rgba {
*x = [0.0; 4];
}
for a in &mut area {
*a = 0.0;
}
rgba.fill([0.0; 4]);
area.fill(0.0);
let tile_x = tile_ix % width_in_tiles;
let tile_y = tile_ix / width_in_tiles;
let mut cmd_ix = tile_ix * PTCL_INITIAL_ALLOC;
Expand All @@ -151,9 +147,7 @@ fn fine_main(
cmd_ix += 4;
}
CMD_SOLID => {
for a in &mut area {
*a = 1.0;
}
area.fill(1.0);
cmd_ix += 2;
}
CMD_COLOR => {
Expand Down

0 comments on commit 178d295

Please sign in to comment.