From b05dc45db397c5141f9a60fffaf68a0c2bbc7b74 Mon Sep 17 00:00:00 2001 From: Dragos Daian Date: Tue, 24 Sep 2024 11:25:38 +0200 Subject: [PATCH] cargo format fix --- examples2d/collision_groups2.rs | 6 ++++-- examples3d/collision_groups3.rs | 6 ++++-- examples3d/vehicle_joints3.rs | 12 ++++++++++-- src/geometry/interaction_groups.rs | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/examples2d/collision_groups2.rs b/examples2d/collision_groups2.rs index be89827b..2784c920 100644 --- a/examples2d/collision_groups2.rs +++ b/examples2d/collision_groups2.rs @@ -24,8 +24,10 @@ pub fn init_world(testbed: &mut Testbed) { /* * Setup groups */ - const GREEN_GROUP: InteractionGroups = InteractionGroups::new(Group::GROUP_1, Group::GROUP_1, InteractionTestMode::AND); - const BLUE_GROUP: InteractionGroups = InteractionGroups::new(Group::GROUP_2, Group::GROUP_2, InteractionTestMode::AND); + const GREEN_GROUP: InteractionGroups = + InteractionGroups::new(Group::GROUP_1, Group::GROUP_1, InteractionTestMode::AND); + const BLUE_GROUP: InteractionGroups = + InteractionGroups::new(Group::GROUP_2, Group::GROUP_2, InteractionTestMode::AND); /* * A green floor that will collide with the GREEN group only. diff --git a/examples3d/collision_groups3.rs b/examples3d/collision_groups3.rs index 131cf6a6..7c8f3577 100644 --- a/examples3d/collision_groups3.rs +++ b/examples3d/collision_groups3.rs @@ -24,8 +24,10 @@ pub fn init_world(testbed: &mut Testbed) { /* * Setup groups */ - const GREEN_GROUP: InteractionGroups = InteractionGroups::new(Group::GROUP_1, Group::GROUP_1, InteractionTestMode::AND); - const BLUE_GROUP: InteractionGroups = InteractionGroups::new(Group::GROUP_2, Group::GROUP_2, InteractionTestMode::AND); + const GREEN_GROUP: InteractionGroups = + InteractionGroups::new(Group::GROUP_1, Group::GROUP_1, InteractionTestMode::AND); + const BLUE_GROUP: InteractionGroups = + InteractionGroups::new(Group::GROUP_2, Group::GROUP_2, InteractionTestMode::AND); /* * A green floor that will collide with the GREEN group only. diff --git a/examples3d/vehicle_joints3.rs b/examples3d/vehicle_joints3.rs index ece3e9fe..fd2633fa 100644 --- a/examples3d/vehicle_joints3.rs +++ b/examples3d/vehicle_joints3.rs @@ -53,7 +53,11 @@ pub fn init_world(testbed: &mut Testbed) { let body_co = ColliderBuilder::cuboid(0.65, 0.3, 0.9) .density(100.0) - .collision_groups(InteractionGroups::new(CAR_GROUP, !CAR_GROUP, InteractionTestMode::AND)); + .collision_groups(InteractionGroups::new( + CAR_GROUP, + !CAR_GROUP, + InteractionTestMode::AND, + )); let body_rb = RigidBodyBuilder::dynamic() .position(body_position.into()) .build(); @@ -85,7 +89,11 @@ pub fn init_world(testbed: &mut Testbed) { // is mathematically simpler than a cylinder and cheaper to compute for collision-detection. let wheel_co = ColliderBuilder::ball(wheel_radius) .density(100.0) - .collision_groups(InteractionGroups::new(CAR_GROUP, !CAR_GROUP, InteractionTestMode::AND)) + .collision_groups(InteractionGroups::new( + CAR_GROUP, + !CAR_GROUP, + InteractionTestMode::AND, + )) .friction(1.0); let wheel_rb = RigidBodyBuilder::dynamic().position(wheel_center.into()); let wheel_handle = bodies.insert(wheel_rb); diff --git a/src/geometry/interaction_groups.rs b/src/geometry/interaction_groups.rs index 3487af36..602654d3 100644 --- a/src/geometry/interaction_groups.rs +++ b/src/geometry/interaction_groups.rs @@ -114,7 +114,7 @@ impl Default for InteractionGroups { Self { memberships: Group::GROUP_1, filter: Group::ALL, - test_mode: InteractionTestMode::AND + test_mode: InteractionTestMode::AND, } } }