Skip to content

Commit ec5d0ef

Browse files
rparrettomarbassam88
authored andcommitted
Fix unnecessary casts
1 parent 6b6df6d commit ec5d0ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/2d/mesh2d_manual.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ fn star(
7070
// Set the position attribute
7171
star.insert_attribute(Mesh::ATTRIBUTE_POSITION, v_pos);
7272
// And a RGB color attribute as well
73-
let mut v_color: Vec<u32> = vec![bytemuck::cast([0 as u8, 0 as u8, 0 as u8, 255 as u8])];
74-
v_color.extend_from_slice(&[bytemuck::cast([255 as u8, 255 as u8, 0 as u8, 255 as u8]); 10]);
73+
let mut v_color: Vec<u32> = vec![bytemuck::cast([0_u8, 0_u8, 0_u8, 255_u8])];
74+
v_color.extend_from_slice(&[bytemuck::cast([255_u8, 255_u8, 0_u8, 255_u8]); 10]);
7575
star.insert_attribute(Mesh::ATTRIBUTE_COLOR, v_color);
7676

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

0 commit comments

Comments
 (0)