Skip to content

Commit

Permalink
[unstable-rust] Fix/suppress dubious clippy::needless_pass_by_ref_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Sep 19, 2023
1 parent 61ccf95 commit 307d9e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions all-is-cubes-content/src/fractal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions all-is-cubes-content/src/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions all-is-cubes/src/space/light/updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ impl Space {
break;
}
}
cube_buffer.end_of_ray(&mut ray_state, self);
cube_buffer.end_of_ray(&ray_state, self);
}
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 307d9e4

Please sign in to comment.