From 344cf017aaa237842f9836bc4bfea238826c9449 Mon Sep 17 00:00:00 2001 From: Patrick Owen Date: Sat, 30 Nov 2024 11:57:07 -0500 Subject: [PATCH] Fix clippy lint warnings for Rust 1.83 The lints in question are - clippy::manual_c_str_literals - clippy::manual_div_ceil - clippy::needless_lifetimes --- client/src/graphics/voxels/surface_extraction.rs | 4 ++-- common/src/plane.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/graphics/voxels/surface_extraction.rs b/client/src/graphics/voxels/surface_extraction.rs index 2607c031..7c49faa4 100644 --- a/client/src/graphics/voxels/surface_extraction.rs +++ b/client/src/graphics/voxels/surface_extraction.rs @@ -110,7 +110,7 @@ impl SurfaceExtraction { .map_entries(&specialization_map_entries) .data(as_bytes(&WORKGROUP_SIZE)); - let p_name = b"main\0".as_ptr() as *const c_char; + let p_name = c"main".as_ptr() as *const c_char; let mut pipelines = device .create_compute_pipelines( gfx.pipeline_cache, @@ -651,5 +651,5 @@ const FACE_SIZE: vk::DeviceSize = 8; const WORKGROUP_SIZE: [u32; 3] = [4, 4, 4]; fn round_up(value: vk::DeviceSize, alignment: vk::DeviceSize) -> vk::DeviceSize { - ((value + alignment - 1) / alignment) * alignment + value.div_ceil(alignment) * alignment } diff --git a/common/src/plane.rs b/common/src/plane.rs index 72888021..6ffc2cb0 100644 --- a/common/src/plane.rs +++ b/common/src/plane.rs @@ -46,7 +46,7 @@ impl Mul> for Side { } } -impl<'a, N: na::RealField + Copy> Mul> for &'a MIsometry { +impl Mul> for &MIsometry { type Output = Plane; fn mul(self, rhs: Plane) -> Plane { Plane {