diff options
| author | rezural <rezural@protonmail.com> | 2020-12-21 04:33:25 +1100 |
|---|---|---|
| committer | rezural <rezural@protonmail.com> | 2020-12-21 04:33:25 +1100 |
| commit | 16720918aac974a57f82c5bc0e840b36c8fa5970 (patch) | |
| tree | 465a95a6439db57964ba6df31259f2f602ceb7f3 /src_testbed/harness/mod.rs | |
| parent | be07227e9455e1549f1fee2f278ab2a266c5c3c2 (diff) | |
| download | rapier-16720918aac974a57f82c5bc0e840b36c8fa5970.tar.gz rapier-16720918aac974a57f82c5bc0e840b36c8fa5970.tar.bz2 rapier-16720918aac974a57f82c5bc0e840b36c8fa5970.zip | |
cargo fmt
Diffstat (limited to 'src_testbed/harness/mod.rs')
| -rw-r--r-- | src_testbed/harness/mod.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src_testbed/harness/mod.rs b/src_testbed/harness/mod.rs index 7d6a939..8ea141f 100644 --- a/src_testbed/harness/mod.rs +++ b/src_testbed/harness/mod.rs @@ -145,7 +145,9 @@ impl Harness { } // type StepCallback = FnMut(&mut PhysicsState, &PhysicsEvents, f32); - pub fn add_callback<F: FnMut(&mut PhysicsState, &PhysicsEvents, &HarnessState, f32) + 'static>( + pub fn add_callback< + F: FnMut(&mut PhysicsState, &PhysicsEvents, &HarnessState, f32) + 'static, + >( &mut self, callback: F, ) { @@ -196,16 +198,11 @@ impl Harness { } for f in &mut self.callbacks { - f( - &mut self.physics, - &self.events, - &self.state, - self.time, - ) + f(&mut self.physics, &self.events, &self.state, self.time) } for plugin in &mut self.plugins { - plugin.run_callbacks(&mut self.physics, &self.events,&self.state, self.time) + plugin.run_callbacks(&mut self.physics, &self.events, &self.state, self.time) } self.events.poll_all(); |
