Clippy fixes

This commit is contained in:
Joshua Barretto 2023-02-09 15:00:28 +00:00
parent 124c7e1496
commit 7fa654ae4c
2 changed files with 4 additions and 4 deletions

View File

@ -462,8 +462,8 @@ pub fn generate_mesh<'a>(
create_opaque(atlas_pos, pos, norm, meta)
},
);
let max_alt = mesh_delta.z as f32 + max_z.unwrap_or(0.0);
let min_alt = mesh_delta.z as f32 + min_z.unwrap_or(0.0);
let max_alt = mesh_delta.z + max_z.unwrap_or(0.0);
let min_alt = mesh_delta.z + min_z.unwrap_or(0.0);
if max_alt < deep_alt {
opaque_deep.push(quad);

View File

@ -1006,7 +1006,7 @@ impl<'pass_ref, 'pass: 'pass_ref> TerrainDrawer<'pass_ref, 'pass> {
self.render_pass.set_vertex_buffer(0, submodel.buf());
self.render_pass
.draw_indexed(0..submodel.len() as u32 / 4 * 6, 0, 0..1);
.draw_indexed(0..submodel.len() / 4 * 6, 0, 0..1);
}
}
@ -1066,7 +1066,7 @@ impl<'pass_ref, 'pass: 'pass_ref> SpriteDrawer<'pass_ref, 'pass> {
self.render_pass.draw_indexed(
0..sprite::VERT_PAGE_SIZE / 4 * 6,
0,
0..subinstances.count() as u32,
0..subinstances.count(),
);
}
}