Skip to content

Commit 29b3612

Browse files
committed
fix clippy
1 parent 384d897 commit 29b3612

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

examples/cube.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ pub fn setup_mpm_particles(
7878
let num_particles = grid_size_x * grid_size_y * grid_size_z;
7979

8080
let particle_positions = (0..num_particles)
81-
.into_iter()
8281
.map(|i| {
8382
let x = i % grid_size_x;
8483
let y = (i / grid_size_x) % grid_size_y;
@@ -142,7 +141,7 @@ pub fn setup_mpm_particles(
142141
velocity: Vector3::zeros(),
143142
volume: ParticleMassProps::new(density * volume, volume.cbrt() / 2.0),
144143
model: ElasticCoefficients::from_young_modulus(
145-
100_000_000.0 * 10f32.powf((z - 1f32)),
144+
100_000_000.0 * 10f32.powf(z - 1f32),
146145
0.2 + x * 0.05f32,
147146
),
148147
plasticity: Some(DruckerPrager {
@@ -151,7 +150,7 @@ pub fn setup_mpm_particles(
151150
h2: 1.6 + z * 0.5f32,
152151
h3: 25.0f32.to_radians() + x,
153152
..DruckerPrager::new(
154-
100_000_000.0 * 10f32.powf((z - 1f32)),
153+
100_000_000.0 * 10f32.powf(z - 1f32),
155154
0.2 + x * 0.05f32,
156155
)
157156
}),
@@ -178,8 +177,5 @@ pub fn setup_mpm_particles(
178177
cell_width,
179178
60_000,
180179
);
181-
commands.insert_resource(PhysicsContext {
182-
data,
183-
particles: particles,
184-
});
180+
commands.insert_resource(PhysicsContext { data, particles });
185181
}

0 commit comments

Comments
 (0)