Skip to content

Add option to configure schedule via CLI/URL params (does actually do… #227

Add option to configure schedule via CLI/URL params (does actually do…

Add option to configure schedule via CLI/URL params (does actually do… #227

GitHub Actions / clippy succeeded Mar 24, 2024 in 2s

clippy

121 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 121
Note 0
Help 0

Versions

  • rustc 1.77.0 (aedd173a2 2024-03-17)
  • cargo 1.77.0 (3fe68eabf 2024-02-29)
  • clippy 0.1.77 (aedd173 2024-03-17)

Annotations

Check warning on line 297 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

returning the result of a `let` binding from a block

warning: returning the result of a `let` binding from a block
   --> demos/src/bin/shooter_like.rs:297:9
    |
180 | /         let command_altering_selectors = CommandAlteringSelectors::default()
181 | |             // By default Tnua uses a raycast, but this could be a problem if the character stands
182 | |             // just past the edge while part of its body is above the platform. To solve this, we
183 | |             // need to cast a shape - which is physics-engine specific. We set the shape using a
...   |
277 | |                 },
278 | |             );
    | |______________- unnecessary `let` binding
...
297 |           command_altering_selectors
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
    = note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
    |
180 ~         
181 |         #[cfg(feature = "rapier3d")]
  ...
198 |         );
199 ~         CommandAlteringSelectors::default()
200 +             // By default Tnua uses a raycast, but this could be a problem if the character stands
201 +             // just past the edge while part of its body is above the platform. To solve this, we
202 +             // need to cast a shape - which is physics-engine specific. We set the shape using a
203 +             // component.
204 +             .with_combo(
205 +                 "Sensor Shape",
206 +                 1,
207 +                 &[
208 +                     ("no", |mut cmd| {
209 +                         #[cfg(feature = "rapier3d")]
210 +                         cmd.remove::<TnuaRapier3dSensorShape>();
211 +                         #[cfg(feature = "xpbd3d")]
212 +                         cmd.remove::<TnuaXpbd3dSensorShape>();
213 +                     }),
214 +                     ("flat (underfit)", |mut cmd| {
215 +                         #[cfg(feature = "rapier3d")]
216 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
217 +                             0.0, 0.49,
218 +                         )));
219 +                         #[cfg(feature = "xpbd3d")]
220 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.49)));
221 +                     }),
222 +                     ("flat (exact)", |mut cmd| {
223 +                         #[cfg(feature = "rapier3d")]
224 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
225 +                             0.0, 0.5,
226 +                         )));
227 +                         #[cfg(feature = "xpbd3d")]
228 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.5)));
229 +                     }),
230 +                     ("flat (overfit)", |mut cmd| {
231 +                         #[cfg(feature = "rapier3d")]
232 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
233 +                             0.0, 0.51,
234 +                         )));
235 +                         #[cfg(feature = "xpbd3d")]
236 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.51)));
237 +                     }),
238 +                     ("ball (underfit)", |mut cmd| {
239 +                         #[cfg(feature = "rapier3d")]
240 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.49)));
241 +                         #[cfg(feature = "xpbd3d")]
242 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::sphere(0.49)));
243 +                     }),
244 +                     ("ball (exact)", |mut cmd| {
245 +                         #[cfg(feature = "rapier3d")]
246 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.5)));
247 +                         #[cfg(feature = "xpbd3d")]
248 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::sphere(0.5)));
249 +                     }),
250 +                 ],
251 +             )
252 +             .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
253 +                 // Tnua will automatically apply angular impulses/forces to fix the tilt and make
254 +                 // the character stand upward, but it is also possible to just let the physics
255 +                 // engine prevent rotation (other than around the Y axis, for turning)
256 +                 if lock_tilt {
257 +                     #[cfg(feature = "rapier3d")]
258 +                     cmd.insert(
259 +                         rapier::LockedAxes::ROTATION_LOCKED_X
260 +                             | rapier::LockedAxes::ROTATION_LOCKED_Z,
261 +                     );
262 +                     #[cfg(feature = "xpbd3d")]
263 +                     cmd.insert(xpbd::LockedAxes::new().lock_rotation_x().lock_rotation_z());
264 +                 } else {
265 +                     #[cfg(feature = "rapier3d")]
266 +                     cmd.insert(rapier::LockedAxes::empty());
267 +                     #[cfg(feature = "xpbd3d")]
268 +                     cmd.insert(xpbd::LockedAxes::new());
269 +                 }
270 +             })
271 +             .with_checkbox(
272 +                 "Phase Through Collision Groups",
273 +                 true,
274 +                 |mut cmd, use_collision_groups| {
275 +                     #[cfg(feature = "rapier3d")]
276 +                     if use_collision_groups {
277 +                         cmd.insert(CollisionGroups {
278 +                             memberships: Group::GROUP_2,
279 +                             filters: Group::GROUP_2,
280 +                         });
281 +                     } else {
282 +                         cmd.insert(CollisionGroups {
283 +                             memberships: Group::ALL,
284 +                             filters: Group::ALL,
285 +                         });
286 +                     }
287 +                     #[cfg(feature = "xpbd3d")]
288 +                     {
289 +                         let player_layers: LayerMask = if use_collision_groups {
290 +                             [LayerNames::Player].into()
291 +                         } else {
292 +                             [LayerNames::Player, LayerNames::PhaseThrough].into()
293 +                         };
294 +                         cmd.insert(CollisionLayers::new(player_layers, player_layers));
295 +                     }
296 +                 },
297 +             )
    |

Check warning on line 255 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/shooter_like.rs:255:18
    |
255 |                 |mut cmd, use_collision_groups| {
    |                  ----^^^
    |                  |
    |                  help: remove this `mut`

Check warning on line 233 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/shooter_like.rs:233:48
    |
233 |             .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
    |                                                ----^^^
    |                                                |
    |                                                help: remove this `mut`

Check warning on line 225 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/shooter_like.rs:225:39
    |
225 |                     ("ball (exact)", |mut cmd| {
    |                                       ----^^^
    |                                       |
    |                                       help: remove this `mut`

Check warning on line 219 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/shooter_like.rs:219:42
    |
219 |                     ("ball (underfit)", |mut cmd| {
    |                                          ----^^^
    |                                          |
    |                                          help: remove this `mut`

Check warning on line 211 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/shooter_like.rs:211:41
    |
211 |                     ("flat (overfit)", |mut cmd| {
    |                                         ----^^^
    |                                         |
    |                                         help: remove this `mut`

Check warning on line 203 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/shooter_like.rs:203:39
    |
203 |                     ("flat (exact)", |mut cmd| {
    |                                       ----^^^
    |                                       |
    |                                       help: remove this `mut`

Check warning on line 195 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/shooter_like.rs:195:42
    |
195 |                     ("flat (underfit)", |mut cmd| {
    |                                          ----^^^
    |                                          |
    |                                          help: remove this `mut`

Check warning on line 189 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/shooter_like.rs:189:29
    |
189 |                     ("no", |mut cmd| {
    |                             ----^^^
    |                             |
    |                             help: remove this `mut`
    |
    = note: `#[warn(unused_mut)]` on by default

Check warning on line 301 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `cmd`

warning: unused variable: `cmd`
   --> demos/src/bin/shooter_like.rs:301:59
    |
301 |     cmd.insert(TnuaCrouchEnforcer::new(0.5 * Vector3::Y, |cmd| {
    |                                                           ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`

Check warning on line 255 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `use_collision_groups`

warning: unused variable: `use_collision_groups`
   --> demos/src/bin/shooter_like.rs:255:27
    |
255 |                 |mut cmd, use_collision_groups| {
    |                           ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_use_collision_groups`

Check warning on line 255 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `cmd`

warning: unused variable: `cmd`
   --> demos/src/bin/shooter_like.rs:255:22
    |
255 |                 |mut cmd, use_collision_groups| {
    |                      ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`

Check warning on line 233 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `cmd`

warning: unused variable: `cmd`
   --> demos/src/bin/shooter_like.rs:233:52
    |
233 |             .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
    |                                                    ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`

Check warning on line 225 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `cmd`

warning: unused variable: `cmd`
   --> demos/src/bin/shooter_like.rs:225:43
    |
225 |                     ("ball (exact)", |mut cmd| {
    |                                           ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`

Check warning on line 219 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `cmd`

warning: unused variable: `cmd`
   --> demos/src/bin/shooter_like.rs:219:46
    |
219 |                     ("ball (underfit)", |mut cmd| {
    |                                              ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`

Check warning on line 211 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `cmd`

warning: unused variable: `cmd`
   --> demos/src/bin/shooter_like.rs:211:45
    |
211 |                     ("flat (overfit)", |mut cmd| {
    |                                             ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`

Check warning on line 203 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `cmd`

warning: unused variable: `cmd`
   --> demos/src/bin/shooter_like.rs:203:43
    |
203 |                     ("flat (exact)", |mut cmd| {
    |                                           ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`

Check warning on line 195 in demos/src/bin/shooter_like.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `cmd`

warning: unused variable: `cmd`
   --> demos/src/bin/shooter_like.rs:195:46
    |
195 |                     ("flat (underfit)", |mut cmd| {
    |                                              ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`

Check warning on line 295 in demos/src/bin/platformer_3d.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

returning the result of a `let` binding from a block

warning: returning the result of a `let` binding from a block
   --> demos/src/bin/platformer_3d.rs:295:9
    |
178 | /         let command_altering_selectors = CommandAlteringSelectors::default()
179 | |             // By default Tnua uses a raycast, but this could be a problem if the character stands
180 | |             // just past the edge while part of its body is above the platform. To solve this, we
181 | |             // need to cast a shape - which is physics-engine specific. We set the shape using a
...   |
275 | |                 },
276 | |             );
    | |______________- unnecessary `let` binding
...
295 |           command_altering_selectors
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
    = note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
    |
178 ~         
179 |         #[cfg(feature = "rapier3d")]
  ...
196 |         );
197 ~         CommandAlteringSelectors::default()
198 +             // By default Tnua uses a raycast, but this could be a problem if the character stands
199 +             // just past the edge while part of its body is above the platform. To solve this, we
200 +             // need to cast a shape - which is physics-engine specific. We set the shape using a
201 +             // component.
202 +             .with_combo(
203 +                 "Sensor Shape",
204 +                 1,
205 +                 &[
206 +                     ("no", |mut cmd| {
207 +                         #[cfg(feature = "rapier3d")]
208 +                         cmd.remove::<TnuaRapier3dSensorShape>();
209 +                         #[cfg(feature = "xpbd3d")]
210 +                         cmd.remove::<TnuaXpbd3dSensorShape>();
211 +                     }),
212 +                     ("flat (underfit)", |mut cmd| {
213 +                         #[cfg(feature = "rapier3d")]
214 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
215 +                             0.0, 0.49,
216 +                         )));
217 +                         #[cfg(feature = "xpbd3d")]
218 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.49)));
219 +                     }),
220 +                     ("flat (exact)", |mut cmd| {
221 +                         #[cfg(feature = "rapier3d")]
222 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
223 +                             0.0, 0.5,
224 +                         )));
225 +                         #[cfg(feature = "xpbd3d")]
226 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.5)));
227 +                     }),
228 +                     ("flat (overfit)", |mut cmd| {
229 +                         #[cfg(feature = "rapier3d")]
230 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
231 +                             0.0, 0.51,
232 +                         )));
233 +                         #[cfg(feature = "xpbd3d")]
234 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.51)));
235 +                     }),
236 +                     ("ball (underfit)", |mut cmd| {
237 +                         #[cfg(feature = "rapier3d")]
238 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.49)));
239 +                         #[cfg(feature = "xpbd3d")]
240 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::sphere(0.49)));
241 +                     }),
242 +                     ("ball (exact)", |mut cmd| {
243 +                         #[cfg(feature = "rapier3d")]
244 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.5)));
245 +                         #[cfg(feature = "xpbd3d")]
246 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::sphere(0.5)));
247 +                     }),
248 +                 ],
249 +             )
250 +             .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
251 +                 // Tnua will automatically apply angular impulses/forces to fix the tilt and make
252 +                 // the character stand upward, but it is also possible to just let the physics
253 +                 // engine prevent rotation (other than around the Y axis, for turning)
254 +                 if lock_tilt {
255 +                     #[cfg(feature = "rapier3d")]
256 +                     cmd.insert(
257 +                         rapier::LockedAxes::ROTATION_LOCKED_X
258 +                             | rapier::LockedAxes::ROTATION_LOCKED_Z,
259 +                     );
260 +                     #[cfg(feature = "xpbd3d")]
261 +                     cmd.insert(xpbd::LockedAxes::new().lock_rotation_x().lock_rotation_z());
262 +                 } else {
263 +                     #[cfg(feature = "rapier3d")]
264 +                     cmd.insert(rapier::LockedAxes::empty());
265 +                     #[cfg(feature = "xpbd3d")]
266 +                     cmd.insert(xpbd::LockedAxes::new());
267 +                 }
268 +             })
269 +             .with_checkbox(
270 +                 "Phase Through Collision Groups",
271 +                 true,
272 +                 |mut cmd, use_collision_groups| {
273 +                     #[cfg(feature = "rapier3d")]
274 +                     if use_collision_groups {
275 +                         cmd.insert(CollisionGroups {
276 +                             memberships: Group::GROUP_2,
277 +                             filters: Group::GROUP_2,
278 +                         });
279 +                     } else {
280 +                         cmd.insert(CollisionGroups {
281 +                             memberships: Group::ALL,
282 +                             filters: Group::ALL,
283 +                         });
284 +                     }
285 +                     #[cfg(feature = "xpbd3d")]
286 +                     {
287 +                         let player_layers: LayerMask = if use_collision_groups {
288 +                             [LayerNames::Player].into()
289 +                         } else {
290 +                             [LayerNames::Player, LayerNames::PhaseThrough].into()
291 +                         };
292 +                         cmd.insert(CollisionLayers::new(player_layers, player_layers));
293 +                     }
294 +                 },
295 +             )
    |

Check warning on line 295 in demos/src/bin/platformer_3d.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

returning the result of a `let` binding from a block

warning: returning the result of a `let` binding from a block
   --> demos/src/bin/platformer_3d.rs:295:9
    |
178 | /         let command_altering_selectors = CommandAlteringSelectors::default()
179 | |             // By default Tnua uses a raycast, but this could be a problem if the character stands
180 | |             // just past the edge while part of its body is above the platform. To solve this, we
181 | |             // need to cast a shape - which is physics-engine specific. We set the shape using a
...   |
275 | |                 },
276 | |             );
    | |______________- unnecessary `let` binding
...
295 |           command_altering_selectors
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
    = note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
    |
178 ~         
179 |         #[cfg(feature = "rapier3d")]
  ...
196 |         );
197 ~         CommandAlteringSelectors::default()
198 +             // By default Tnua uses a raycast, but this could be a problem if the character stands
199 +             // just past the edge while part of its body is above the platform. To solve this, we
200 +             // need to cast a shape - which is physics-engine specific. We set the shape using a
201 +             // component.
202 +             .with_combo(
203 +                 "Sensor Shape",
204 +                 1,
205 +                 &[
206 +                     ("no", |mut cmd| {
207 +                         #[cfg(feature = "rapier3d")]
208 +                         cmd.remove::<TnuaRapier3dSensorShape>();
209 +                         #[cfg(feature = "xpbd3d")]
210 +                         cmd.remove::<TnuaXpbd3dSensorShape>();
211 +                     }),
212 +                     ("flat (underfit)", |mut cmd| {
213 +                         #[cfg(feature = "rapier3d")]
214 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
215 +                             0.0, 0.49,
216 +                         )));
217 +                         #[cfg(feature = "xpbd3d")]
218 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.49)));
219 +                     }),
220 +                     ("flat (exact)", |mut cmd| {
221 +                         #[cfg(feature = "rapier3d")]
222 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
223 +                             0.0, 0.5,
224 +                         )));
225 +                         #[cfg(feature = "xpbd3d")]
226 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.5)));
227 +                     }),
228 +                     ("flat (overfit)", |mut cmd| {
229 +                         #[cfg(feature = "rapier3d")]
230 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
231 +                             0.0, 0.51,
232 +                         )));
233 +                         #[cfg(feature = "xpbd3d")]
234 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.51)));
235 +                     }),
236 +                     ("ball (underfit)", |mut cmd| {
237 +                         #[cfg(feature = "rapier3d")]
238 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.49)));
239 +                         #[cfg(feature = "xpbd3d")]
240 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::sphere(0.49)));
241 +                     }),
242 +                     ("ball (exact)", |mut cmd| {
243 +                         #[cfg(feature = "rapier3d")]
244 +                         cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.5)));
245 +                         #[cfg(feature = "xpbd3d")]
246 +                         cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::sphere(0.5)));
247 +                     }),
248 +                 ],
249 +             )
250 +             .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
251 +                 // Tnua will automatically apply angular impulses/forces to fix the tilt and make
252 +                 // the character stand upward, but it is also possible to just let the physics
253 +                 // engine prevent rotation (other than around the Y axis, for turning)
254 +                 if lock_tilt {
255 +                     #[cfg(feature = "rapier3d")]
256 +                     cmd.insert(
257 +                         rapier::LockedAxes::ROTATION_LOCKED_X
258 +                             | rapier::LockedAxes::ROTATION_LOCKED_Z,
259 +                     );
260 +                     #[cfg(feature = "xpbd3d")]
261 +                     cmd.insert(xpbd::LockedAxes::new().lock_rotation_x().lock_rotation_z());
262 +                 } else {
263 +                     #[cfg(feature = "rapier3d")]
264 +                     cmd.insert(rapier::LockedAxes::empty());
265 +                     #[cfg(feature = "xpbd3d")]
266 +                     cmd.insert(xpbd::LockedAxes::new());
267 +                 }
268 +             })
269 +             .with_checkbox(
270 +                 "Phase Through Collision Groups",
271 +                 true,
272 +                 |mut cmd, use_collision_groups| {
273 +                     #[cfg(feature = "rapier3d")]
274 +                     if use_collision_groups {
275 +                         cmd.insert(CollisionGroups {
276 +                             memberships: Group::GROUP_2,
277 +                             filters: Group::GROUP_2,
278 +                         });
279 +                     } else {
280 +                         cmd.insert(CollisionGroups {
281 +                             memberships: Group::ALL,
282 +                             filters: Group::ALL,
283 +                         });
284 +                     }
285 +                     #[cfg(feature = "xpbd3d")]
286 +                     {
287 +                         let player_layers: LayerMask = if use_collision_groups {
288 +                             [LayerNames::Player].into()
289 +                         } else {
290 +                             [LayerNames::Player, LayerNames::PhaseThrough].into()
291 +                         };
292 +                         cmd.insert(CollisionLayers::new(player_layers, player_layers));
293 +                     }
294 +                 },
295 +             )
    |

Check warning on line 253 in demos/src/bin/platformer_3d.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/platformer_3d.rs:253:18
    |
253 |                 |mut cmd, use_collision_groups| {
    |                  ----^^^
    |                  |
    |                  help: remove this `mut`

Check warning on line 231 in demos/src/bin/platformer_3d.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/platformer_3d.rs:231:48
    |
231 |             .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
    |                                                ----^^^
    |                                                |
    |                                                help: remove this `mut`

Check warning on line 223 in demos/src/bin/platformer_3d.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/platformer_3d.rs:223:39
    |
223 |                     ("ball (exact)", |mut cmd| {
    |                                       ----^^^
    |                                       |
    |                                       help: remove this `mut`

Check warning on line 217 in demos/src/bin/platformer_3d.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/platformer_3d.rs:217:42
    |
217 |                     ("ball (underfit)", |mut cmd| {
    |                                          ----^^^
    |                                          |
    |                                          help: remove this `mut`

Check warning on line 209 in demos/src/bin/platformer_3d.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
   --> demos/src/bin/platformer_3d.rs:209:41
    |
209 |                     ("flat (overfit)", |mut cmd| {
    |                                         ----^^^
    |                                         |
    |                                         help: remove this `mut`