Skip to content

Commit

Permalink
Fix unnecessary casts
Browse files Browse the repository at this point in the history
  • Loading branch information
rparrett authored and omarbassam88 committed Mar 10, 2022
1 parent 6b6df6d commit ec5d0ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/2d/mesh2d_manual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ fn star(
// Set the position attribute
star.insert_attribute(Mesh::ATTRIBUTE_POSITION, v_pos);
// And a RGB color attribute as well
let mut v_color: Vec<u32> = vec![bytemuck::cast([0 as u8, 0 as u8, 0 as u8, 255 as u8])];
v_color.extend_from_slice(&[bytemuck::cast([255 as u8, 255 as u8, 0 as u8, 255 as u8]); 10]);
let mut v_color: Vec<u32> = vec![bytemuck::cast([0_u8, 0_u8, 0_u8, 255_u8])];
v_color.extend_from_slice(&[bytemuck::cast([255_u8, 255_u8, 0_u8, 255_u8]); 10]);
star.insert_attribute(Mesh::ATTRIBUTE_COLOR, v_color);

// Now, we specify the indices of the vertex that are going to compose the
Expand Down

0 comments on commit ec5d0ef

Please sign in to comment.