From 307d9e40dda21995196cd009e813000bed88a948 Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Tue, 8 Aug 2023 17:56:10 -0700 Subject: [PATCH] [unstable-rust] Fix/suppress dubious clippy::needless_pass_by_ref_mut --- all-is-cubes-content/src/fractal.rs | 1 + all-is-cubes-content/src/template.rs | 1 + all-is-cubes/src/space/light/updater.rs | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/all-is-cubes-content/src/fractal.rs b/all-is-cubes-content/src/fractal.rs index 7ce889075..36921c282 100644 --- a/all-is-cubes-content/src/fractal.rs +++ b/all-is-cubes-content/src/fractal.rs @@ -11,6 +11,7 @@ use all_is_cubes::universe::Universe; use crate::DemoBlocks; +#[allow(clippy::needless_pass_by_ref_mut)] pub(crate) fn menger_sponge( universe: &mut Universe, world_levels: u8, diff --git a/all-is-cubes-content/src/template.rs b/all-is-cubes-content/src/template.rs index e4d22fb11..1758d0d9d 100644 --- a/all-is-cubes-content/src/template.rs +++ b/all-is-cubes-content/src/template.rs @@ -303,6 +303,7 @@ impl WhenceUniverse for TemplateAndParameters { // -- Specific templates below this point --- +#[allow(clippy::needless_pass_by_ref_mut)] async fn islands( universe: &mut Universe, p: YieldProgress, diff --git a/all-is-cubes/src/space/light/updater.rs b/all-is-cubes/src/space/light/updater.rs index be9eac6d1..e67a479b0 100644 --- a/all-is-cubes/src/space/light/updater.rs +++ b/all-is-cubes/src/space/light/updater.rs @@ -198,7 +198,7 @@ impl Space { break; } } - cube_buffer.end_of_ray(&mut ray_state, self); + cube_buffer.end_of_ray(&ray_state, self); } } @@ -470,7 +470,7 @@ impl LightBuffer { /// The raycast exited the world or hit an opaque block; finish up by applying /// sky and incrementing the count. - fn end_of_ray(&mut self, ray_state: &mut LightRayState, space: &Space) { + fn end_of_ray(&mut self, ray_state: &LightRayState, space: &Space) { // TODO: set *info even if we hit the sky // Note: this condition is key to allowing some cases to