Skip to content

Commit

Permalink
Fix new clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
johnthagen committed Apr 3, 2024
1 parent 16b440a commit be1f1ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/models/asteroid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fn generate_jagged_shape(radius: f64, num_segments: usize) -> Vec<[f64; 2]> {
randomize_shape(new_shape, max_mut)
}

fn center_mass(shape: &mut Vec<[f64; 2]>) -> Vector {
fn center_mass(shape: &mut [[f64; 2]]) -> Vector {
let mut average = Vector::default();
for vertex in &mut shape.iter() {
// Here, we are adding the new vertex location into what will be our average location.
Expand Down

0 comments on commit be1f1ee

Please sign in to comment.