diff options
| author | rezural <rezural@protonmail.com> | 2020-12-31 15:23:25 +1100 |
|---|---|---|
| committer | rezural <rezural@protonmail.com> | 2020-12-31 15:23:25 +1100 |
| commit | 6f508e5d04e5652991f9feaad09231af84542ac1 (patch) | |
| tree | bce4330348a5fe78bdb5476be7e837129818e7d6 /src_testbed | |
| parent | 1ac2d03fea4f51164df0b662fe990c27aedaf0ab (diff) | |
| download | rapier-6f508e5d04e5652991f9feaad09231af84542ac1.tar.gz rapier-6f508e5d04e5652991f9feaad09231af84542ac1.tar.bz2 rapier-6f508e5d04e5652991f9feaad09231af84542ac1.zip | |
remove redundant time :f32 from harness callbacks. it can be access via run_state.time
Diffstat (limited to 'src_testbed')
| -rw-r--r-- | src_testbed/harness/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src_testbed/harness/mod.rs b/src_testbed/harness/mod.rs index 45e52dc..638c4ed 100644 --- a/src_testbed/harness/mod.rs +++ b/src_testbed/harness/mod.rs @@ -48,7 +48,7 @@ pub struct Harness { pub state: RunState, } -type Callbacks = Vec<Box<dyn FnMut(&mut PhysicsState, &PhysicsEvents, &RunState, f32)>>; +type Callbacks = Vec<Box<dyn FnMut(&mut PhysicsState, &PhysicsEvents, &RunState)>>; #[allow(dead_code)] impl Harness { @@ -130,7 +130,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) + 'static>( &mut self, callback: F, ) { @@ -185,7 +185,6 @@ impl Harness { &mut self.physics, &self.events, &self.state, - self.state.time, ) } |
