cargo fmt

This commit is contained in:
rezural
2020-12-24 20:16:11 +11:00
parent baccfff4cd
commit b1d0dc006d
2 changed files with 61 additions and 31 deletions

View File

@@ -20,7 +20,7 @@ impl RunState {
#[cfg(feature = "parallel")]
thread_pool: rapier::rayon::ThreadPool,
timestep_id: 0,
time: 0.0
time: 0.0,
}
}
}
@@ -117,9 +117,7 @@ impl Harness {
self.plugins.push(Box::new(plugin));
}
pub fn add_callback<
F: FnMut(&mut PhysicsState, &PhysicsEvents, &RunState, f32) + 'static,
>(
pub fn add_callback<F: FnMut(&mut PhysicsState, &PhysicsEvents, &RunState, f32) + 'static>(
&mut self,
callback: F,
) {
@@ -170,11 +168,21 @@ impl Harness {
}
for f in &mut self.callbacks {
f(&mut self.physics, &self.events, &self.state, self.state.time)
f(
&mut self.physics,
&self.events,
&self.state,
self.state.time,
)
}
for plugin in &mut self.plugins {
plugin.run_callbacks(&mut self.physics, &self.events, &self.state, self.state.time)
plugin.run_callbacks(
&mut self.physics,
&self.events,
&self.state,
self.state.time,
)
}
self.events.poll_all();