clippy
This commit is contained in:
parent
953c540263
commit
a613b6e9b2
@ -158,7 +158,7 @@ impl Model {
|
||||
diffusivity: usize,
|
||||
) -> Self {
|
||||
let particles_per_grid = (n_particles as f64 / n_populations as f64).ceil() as usize;
|
||||
let n_particles = particles_per_grid * n_populations;
|
||||
let _n_particles = particles_per_grid * n_populations;
|
||||
|
||||
let mut rng = rand::thread_rng();
|
||||
|
||||
@ -180,7 +180,7 @@ impl Model {
|
||||
}
|
||||
|
||||
let mut grids: Vec<Grid> = Vec::new();
|
||||
for _ in (0..n_populations) {
|
||||
for _ in 0..n_populations {
|
||||
let agents = (0..particles_per_grid)
|
||||
.map(|i| Agent::new(width, height, i / particles_per_grid, &mut rng, i)).collect();
|
||||
grids.push(Grid::new(width, height, &mut rng, agents));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user