Add changelog entries for the new f64
and schedule choosing features
#231
clippy
122 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 122 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.77.1 (7cf61ebde 2024-03-27)
- cargo 1.77.1 (e52e36006 2024-03-26)
- clippy 0.1.77 (7cf61eb 2024-03-27)
Annotations
Check warning on line 63 in demos/src/moving_platform.rs
github-actions / clippy
associated function `make_system` is never used
warning: associated function `make_system` is never used
--> demos/src/moving_platform.rs:63:8
|
54 | impl MovingPlatform {
| ------------------- associated function in this implementation
...
63 | fn make_system<V: Component>(
| ^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 229 in demos/src/ui/mod.rs
github-actions / clippy
unused variable: `setting_from_ui`
warning: unused variable: `setting_from_ui`
--> demos/src/ui/mod.rs:229:5
|
229 | setting_from_ui: Res<DemoUiPhysicsBackendActive>,
| ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_setting_from_ui`
Check warning on line 7 in demos/src/moving_platform.rs
github-actions / clippy
unused variable: `app`
warning: unused variable: `app`
--> demos/src/moving_platform.rs:7:21
|
7 | fn build(&self, app: &mut App) {
| ^^^ help: if this is intentional, prefix it with an underscore: `_app`
|
= note: `#[warn(unused_variables)]` on by default
Check warning on line 345 in demos/src/bin/shooter_like.rs
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:345:9
|
228 | / let command_altering_selectors = CommandAlteringSelectors::default()
229 | | // By default Tnua uses a raycast, but this could be a problem if the character stands
230 | | // just past the edge while part of its body is above the platform. To solve this, we
231 | | // need to cast a shape - which is physics-engine specific. We set the shape using a
... |
325 | | },
326 | | );
| |______________- unnecessary `let` binding
...
345 | 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
|
228 ~
229 | #[cfg(feature = "rapier3d")]
...
246 | );
247 ~ CommandAlteringSelectors::default()
248 + // By default Tnua uses a raycast, but this could be a problem if the character stands
249 + // just past the edge while part of its body is above the platform. To solve this, we
250 + // need to cast a shape - which is physics-engine specific. We set the shape using a
251 + // component.
252 + .with_combo(
253 + "Sensor Shape",
254 + 1,
255 + &[
256 + ("no", |mut cmd| {
257 + #[cfg(feature = "rapier3d")]
258 + cmd.remove::<TnuaRapier3dSensorShape>();
259 + #[cfg(feature = "xpbd3d")]
260 + cmd.remove::<TnuaXpbd3dSensorShape>();
261 + }),
262 + ("flat (underfit)", |mut cmd| {
263 + #[cfg(feature = "rapier3d")]
264 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
265 + 0.0, 0.49,
266 + )));
267 + #[cfg(feature = "xpbd3d")]
268 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.49)));
269 + }),
270 + ("flat (exact)", |mut cmd| {
271 + #[cfg(feature = "rapier3d")]
272 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
273 + 0.0, 0.5,
274 + )));
275 + #[cfg(feature = "xpbd3d")]
276 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.5)));
277 + }),
278 + ("flat (overfit)", |mut cmd| {
279 + #[cfg(feature = "rapier3d")]
280 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
281 + 0.0, 0.51,
282 + )));
283 + #[cfg(feature = "xpbd3d")]
284 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.51)));
285 + }),
286 + ("ball (underfit)", |mut cmd| {
287 + #[cfg(feature = "rapier3d")]
288 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.49)));
289 + #[cfg(feature = "xpbd3d")]
290 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::sphere(0.49)));
291 + }),
292 + ("ball (exact)", |mut cmd| {
293 + #[cfg(feature = "rapier3d")]
294 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.5)));
295 + #[cfg(feature = "xpbd3d")]
296 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::sphere(0.5)));
297 + }),
298 + ],
299 + )
300 + .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
301 + // Tnua will automatically apply angular impulses/forces to fix the tilt and make
302 + // the character stand upward, but it is also possible to just let the physics
303 + // engine prevent rotation (other than around the Y axis, for turning)
304 + if lock_tilt {
305 + #[cfg(feature = "rapier3d")]
306 + cmd.insert(
307 + rapier::LockedAxes::ROTATION_LOCKED_X
308 + | rapier::LockedAxes::ROTATION_LOCKED_Z,
309 + );
310 + #[cfg(feature = "xpbd3d")]
311 + cmd.insert(xpbd::LockedAxes::new().lock_rotation_x().lock_rotation_z());
312 + } else {
313 + #[cfg(feature = "rapier3d")]
314 + cmd.insert(rapier::LockedAxes::empty());
315 + #[cfg(feature = "xpbd3d")]
316 + cmd.insert(xpbd::LockedAxes::new());
317 + }
318 + })
319 + .with_checkbox(
320 + "Phase Through Collision Groups",
321 + true,
322 + |mut cmd, use_collision_groups| {
323 + #[cfg(feature = "rapier3d")]
324 + if use_collision_groups {
325 + cmd.insert(CollisionGroups {
326 + memberships: Group::GROUP_2,
327 + filters: Group::GROUP_2,
328 + });
329 + } else {
330 + cmd.insert(CollisionGroups {
331 + memberships: Group::ALL,
332 + filters: Group::ALL,
333 + });
334 + }
335 + #[cfg(feature = "xpbd3d")]
336 + {
337 + let player_layers: LayerMask = if use_collision_groups {
338 + [LayerNames::Player].into()
339 + } else {
340 + [LayerNames::Player, LayerNames::PhaseThrough].into()
341 + };
342 + cmd.insert(CollisionLayers::new(player_layers, player_layers));
343 + }
344 + },
345 + )
|
Check warning on line 303 in demos/src/bin/shooter_like.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> demos/src/bin/shooter_like.rs:303:18
|
303 | |mut cmd, use_collision_groups| {
| ----^^^
| |
| help: remove this `mut`
Check warning on line 281 in demos/src/bin/shooter_like.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> demos/src/bin/shooter_like.rs:281:48
|
281 | .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
| ----^^^
| |
| help: remove this `mut`
Check warning on line 273 in demos/src/bin/shooter_like.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> demos/src/bin/shooter_like.rs:273:39
|
273 | ("ball (exact)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
Check warning on line 267 in demos/src/bin/shooter_like.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> demos/src/bin/shooter_like.rs:267:42
|
267 | ("ball (underfit)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
Check warning on line 259 in demos/src/bin/shooter_like.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> demos/src/bin/shooter_like.rs:259:41
|
259 | ("flat (overfit)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
Check warning on line 251 in demos/src/bin/shooter_like.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> demos/src/bin/shooter_like.rs:251:39
|
251 | ("flat (exact)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
Check warning on line 243 in demos/src/bin/shooter_like.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> demos/src/bin/shooter_like.rs:243:42
|
243 | ("flat (underfit)", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
Check warning on line 339 in demos/src/bin/platformer_3d.rs
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:339:9
|
222 | / let command_altering_selectors = CommandAlteringSelectors::default()
223 | | // By default Tnua uses a raycast, but this could be a problem if the character stands
224 | | // just past the edge while part of its body is above the platform. To solve this, we
225 | | // need to cast a shape - which is physics-engine specific. We set the shape using a
... |
319 | | },
320 | | );
| |______________- unnecessary `let` binding
...
339 | 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
|
222 ~
223 | #[cfg(feature = "rapier3d")]
...
240 | );
241 ~ CommandAlteringSelectors::default()
242 + // By default Tnua uses a raycast, but this could be a problem if the character stands
243 + // just past the edge while part of its body is above the platform. To solve this, we
244 + // need to cast a shape - which is physics-engine specific. We set the shape using a
245 + // component.
246 + .with_combo(
247 + "Sensor Shape",
248 + 1,
249 + &[
250 + ("no", |mut cmd| {
251 + #[cfg(feature = "rapier3d")]
252 + cmd.remove::<TnuaRapier3dSensorShape>();
253 + #[cfg(feature = "xpbd3d")]
254 + cmd.remove::<TnuaXpbd3dSensorShape>();
255 + }),
256 + ("flat (underfit)", |mut cmd| {
257 + #[cfg(feature = "rapier3d")]
258 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
259 + 0.0, 0.49,
260 + )));
261 + #[cfg(feature = "xpbd3d")]
262 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.49)));
263 + }),
264 + ("flat (exact)", |mut cmd| {
265 + #[cfg(feature = "rapier3d")]
266 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
267 + 0.0, 0.5,
268 + )));
269 + #[cfg(feature = "xpbd3d")]
270 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.5)));
271 + }),
272 + ("flat (overfit)", |mut cmd| {
273 + #[cfg(feature = "rapier3d")]
274 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::cylinder(
275 + 0.0, 0.51,
276 + )));
277 + #[cfg(feature = "xpbd3d")]
278 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::cylinder(0.0, 0.51)));
279 + }),
280 + ("ball (underfit)", |mut cmd| {
281 + #[cfg(feature = "rapier3d")]
282 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.49)));
283 + #[cfg(feature = "xpbd3d")]
284 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::sphere(0.49)));
285 + }),
286 + ("ball (exact)", |mut cmd| {
287 + #[cfg(feature = "rapier3d")]
288 + cmd.insert(TnuaRapier3dSensorShape(rapier::Collider::ball(0.5)));
289 + #[cfg(feature = "xpbd3d")]
290 + cmd.insert(TnuaXpbd3dSensorShape(xpbd::Collider::sphere(0.5)));
291 + }),
292 + ],
293 + )
294 + .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
295 + // Tnua will automatically apply angular impulses/forces to fix the tilt and make
296 + // the character stand upward, but it is also possible to just let the physics
297 + // engine prevent rotation (other than around the Y axis, for turning)
298 + if lock_tilt {
299 + #[cfg(feature = "rapier3d")]
300 + cmd.insert(
301 + rapier::LockedAxes::ROTATION_LOCKED_X
302 + | rapier::LockedAxes::ROTATION_LOCKED_Z,
303 + );
304 + #[cfg(feature = "xpbd3d")]
305 + cmd.insert(xpbd::LockedAxes::new().lock_rotation_x().lock_rotation_z());
306 + } else {
307 + #[cfg(feature = "rapier3d")]
308 + cmd.insert(rapier::LockedAxes::empty());
309 + #[cfg(feature = "xpbd3d")]
310 + cmd.insert(xpbd::LockedAxes::new());
311 + }
312 + })
313 + .with_checkbox(
314 + "Phase Through Collision Groups",
315 + true,
316 + |mut cmd, use_collision_groups| {
317 + #[cfg(feature = "rapier3d")]
318 + if use_collision_groups {
319 + cmd.insert(CollisionGroups {
320 + memberships: Group::GROUP_2,
321 + filters: Group::GROUP_2,
322 + });
323 + } else {
324 + cmd.insert(CollisionGroups {
325 + memberships: Group::ALL,
326 + filters: Group::ALL,
327 + });
328 + }
329 + #[cfg(feature = "xpbd3d")]
330 + {
331 + let player_layers: LayerMask = if use_collision_groups {
332 + [LayerNames::Player].into()
333 + } else {
334 + [LayerNames::Player, LayerNames::PhaseThrough].into()
335 + };
336 + cmd.insert(CollisionLayers::new(player_layers, player_layers));
337 + }
338 + },
339 + )
|
Check warning on line 237 in demos/src/bin/shooter_like.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> demos/src/bin/shooter_like.rs:237:29
|
237 | ("no", |mut cmd| {
| ----^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
Check warning on line 349 in demos/src/bin/shooter_like.rs
github-actions / clippy
unused variable: `cmd`
warning: unused variable: `cmd`
--> demos/src/bin/shooter_like.rs:349:59
|
349 | cmd.insert(TnuaCrouchEnforcer::new(0.5 * Vector3::Y, |cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
Check warning on line 303 in demos/src/bin/shooter_like.rs
github-actions / clippy
unused variable: `use_collision_groups`
warning: unused variable: `use_collision_groups`
--> demos/src/bin/shooter_like.rs:303:27
|
303 | |mut cmd, use_collision_groups| {
| ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_use_collision_groups`
Check warning on line 303 in demos/src/bin/shooter_like.rs
github-actions / clippy
unused variable: `cmd`
warning: unused variable: `cmd`
--> demos/src/bin/shooter_like.rs:303:22
|
303 | |mut cmd, use_collision_groups| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
Check warning on line 281 in demos/src/bin/shooter_like.rs
github-actions / clippy
unused variable: `cmd`
warning: unused variable: `cmd`
--> demos/src/bin/shooter_like.rs:281:52
|
281 | .with_checkbox("Lock Tilt", true, |mut cmd, lock_tilt| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
Check warning on line 273 in demos/src/bin/shooter_like.rs
github-actions / clippy
unused variable: `cmd`
warning: unused variable: `cmd`
--> demos/src/bin/shooter_like.rs:273:43
|
273 | ("ball (exact)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
Check warning on line 267 in demos/src/bin/shooter_like.rs
github-actions / clippy
unused variable: `cmd`
warning: unused variable: `cmd`
--> demos/src/bin/shooter_like.rs:267:46
|
267 | ("ball (underfit)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
Check warning on line 259 in demos/src/bin/shooter_like.rs
github-actions / clippy
unused variable: `cmd`
warning: unused variable: `cmd`
--> demos/src/bin/shooter_like.rs:259:45
|
259 | ("flat (overfit)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
Check warning on line 251 in demos/src/bin/shooter_like.rs
github-actions / clippy
unused variable: `cmd`
warning: unused variable: `cmd`
--> demos/src/bin/shooter_like.rs:251:43
|
251 | ("flat (exact)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
Check warning on line 243 in demos/src/bin/shooter_like.rs
github-actions / clippy
unused variable: `cmd`
warning: unused variable: `cmd`
--> demos/src/bin/shooter_like.rs:243:46
|
243 | ("flat (underfit)", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
Check warning on line 237 in demos/src/bin/shooter_like.rs
github-actions / clippy
unused variable: `cmd`
warning: unused variable: `cmd`
--> demos/src/bin/shooter_like.rs:237:33
|
237 | ("no", |mut cmd| {
| ^^^ help: if this is intentional, prefix it with an underscore: `_cmd`
|
= note: `#[warn(unused_variables)]` on by default
Check warning on line 22 in demos/src/ui/mod.rs
github-actions / clippy
unused import: `make_update_plot_data_system`
warning: unused import: `make_update_plot_data_system`
--> demos/src/ui/mod.rs:22:22
|
22 | use self::plotting::{make_update_plot_data_system, plot_source_rolling_update};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Check warning on line 297 in demos/src/bin/platformer_3d.rs
github-actions / clippy
variable does not need to be mutable
warning: variable does not need to be mutable
--> demos/src/bin/platformer_3d.rs:297:18
|
297 | |mut cmd, use_collision_groups| {
| ----^^^
| |
| help: remove this `mut`