Skip to content

Commit

Permalink
Fix clippy lint warnings for Rust 1.83
Browse files Browse the repository at this point in the history
The lints in question are
- clippy::manual_c_str_literals
- clippy::manual_div_ceil
- clippy::needless_lifetimes
  • Loading branch information
patowen authored and Ralith committed Nov 30, 2024
1 parent 82c4a9b commit 344cf01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client/src/graphics/voxels/surface_extraction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion common/src/plane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Mul<Plane<f64>> for Side {
}
}

impl<'a, N: na::RealField + Copy> Mul<Plane<N>> for &'a MIsometry<N> {
impl<N: na::RealField + Copy> Mul<Plane<N>> for &MIsometry<N> {
type Output = Plane<N>;
fn mul(self, rhs: Plane<N>) -> Plane<N> {
Plane {
Expand Down

0 comments on commit 344cf01

Please sign in to comment.