cargo fmt

This commit is contained in:
rezural
2020-12-31 13:31:30 +11:00
parent 26af08e03c
commit e11ace3831
6 changed files with 80 additions and 72 deletions

View File

@@ -60,7 +60,9 @@ pub fn init_world(testbed: &mut Testbed) {
/*
* Setup a callback to control the platform.
*/
testbed.harness_mut().add_callback(move |physics, _, run_state, _| {
testbed
.harness_mut()
.add_callback(move |physics, _, run_state, _| {
let platform = physics.bodies.get_mut(platform_handle).unwrap();
let mut next_pos = *platform.position();

View File

@@ -69,7 +69,9 @@ pub fn init_world(testbed: &mut Testbed) {
testbed.set_body_color(sensor_handle, Point3::new(0.5, 1.0, 1.0));
// Callback that will be executed on the main loop to handle proximities.
testbed.harness_mut().add_callback(move |physics, events, _, _| {
testbed
.harness_mut()
.add_callback(move |physics, events, _, _| {
while let Ok(prox) = events.proximity_events.try_recv() {
let color = match prox.new_status {
Proximity::WithinMargin | Proximity::Intersecting => Point3::new(1.0, 1.0, 0.0),

View File

@@ -65,7 +65,9 @@ pub fn init_world(testbed: &mut Testbed) {
* Setup a callback to control the platform.
*/
let mut count = 0;
testbed.harness_mut().add_callback(move |physics, _, run_state, _| {
testbed
.harness_mut()
.add_callback(move |physics, _, run_state, _| {
count += 1;
if count % 100 > 50 {
return;

View File

@@ -73,7 +73,9 @@ pub fn init_world(testbed: &mut Testbed) {
testbed.set_body_color(sensor_handle, Point3::new(0.5, 1.0, 1.0));
// Callback that will be executed on the main loop to handle proximities.
testbed.harness_mut().add_callback(move |physics, events, _, _| {
testbed
.harness_mut()
.add_callback(move |physics, events, _, _| {
while let Ok(prox) = events.proximity_events.try_recv() {
let color = match prox.new_status {
Proximity::WithinMargin | Proximity::Intersecting => Point3::new(1.0, 1.0, 0.0),