Clean up warnings and nightly features #56
Run clippy (ubuntu-latest, all features)
36 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 36 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.84.0-nightly (705cfe0e9 2024-11-01)
- cargo 1.84.0-nightly (e75214ea4 2024-10-25)
- clippy 0.1.84 (705cfe0e96 2024-11-01)
Annotations
Check warning on line 1483 in frontend/desktop/src/ui.rs
github-actions / Run clippy (ubuntu-latest, all features)
empty line after outer attribute
warning: empty line after outer attribute
--> frontend/desktop/src/ui.rs:1482:33
|
1482 | / ... #[cfg(feature = "gdb-server")]
1483 | | ...
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr
= note: `#[warn(clippy::empty_line_after_outer_attr)]` implied by `#[warn(clippy::all)]`
= help: if the empty line is unintentional remove it
Check warning on line 127 in frontend/desktop/src/input/map.rs
github-actions / Run clippy (ubuntu-latest, all features)
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> frontend/desktop/src/input/map.rs:127:14
|
127 | impl<'a, T: 'static + Eq, U: 'static + Serialize> Serialize for TriggerMap<'a, T, U> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
127 - impl<'a, T: 'static + Eq, U: 'static + Serialize> Serialize for TriggerMap<'a, T, U> {
127 + impl<T: 'static + Eq, U: 'static + Serialize> Serialize for TriggerMap<'_, T, U> {
|
Check warning on line 114 in frontend/desktop/src/utils.rs
github-actions / Run clippy (ubuntu-latest, all features)
the following explicit lifetimes could be elided: 'de
warning: the following explicit lifetimes could be elided: 'de
--> frontend/desktop/src/utils.rs:114:6
|
114 | impl<'de> serde::de::Visitor<'de> for HomePathBufVisitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
note: the lint level is defined here
--> frontend/desktop/src/main.rs:9:9
|
9 | #![warn(clippy::all)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::needless_lifetimes)]` implied by `#[warn(clippy::all)]`
help: elide the lifetimes
|
114 - impl<'de> serde::de::Visitor<'de> for HomePathBufVisitor {
114 + impl serde::de::Visitor<'_> for HomePathBufVisitor {
|
Check warning on line 599 in frontend/desktop/src/ui/window.rs
github-actions / Run clippy (ubuntu-latest, all features)
use of deprecated method `winit::event_loop::EventLoop::<T>::run`: use `EventLoop::run_app` instead
warning: use of deprecated method `winit::event_loop::EventLoop::<T>::run`: use `EventLoop::run_app` instead
--> frontend/desktop/src/ui/window.rs:599:33
|
599 | let _ = self.event_loop.run(move |event, elwt| {
| ^^^
|
= note: `#[warn(deprecated)]` on by default
Check warning on line 6 in render/wgpu-3d/src/utils.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `div_ceil`
warning: manually reimplementing `div_ceil`
--> render/wgpu-3d/src/utils.rs:6:5
|
6 | (size + alignment - 1) / alignment * alignment
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `size.div_ceil(alignment)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
note: the lint level is defined here
--> render/wgpu-3d/src/lib.rs:2:9
|
2 | #![warn(clippy::all)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::manual_div_ceil)]` implied by `#[warn(clippy::all)]`
Check warning on line 260 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:260:16
|
260 | if new & (new - 1) == 0
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `new.is_power_of_two()`
...
1178 | / unmap_region!(
1179 | | wb self,
1180 | | arm7, 0x4_0000, 17, 0,
1181 | | (
... |
1186 | | bank, MASK, BANK_BIT, false, region
1187 | | );
| |_________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `unmap_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 132 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:132:16
|
132 | if prev & (prev - 1) == 0
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `prev.is_power_of_two()`
...
1154 | / map_region!(
1155 | | wb self,
1156 | | arm7, 0x4_0000, 17, 0,
1157 | | (
... |
1162 | | bank, MASK, BANK_BIT, region
1163 | | );
| |_________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `map_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 260 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:260:16
|
260 | if new & (new - 1) == 0
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `new.is_power_of_two()`
...
1081 | / unmap_region!(
1082 | | wb self,
1083 | | b_obj, 0x2_0000, 17, 2, bg_obj_updates,
1084 | | (
... |
1089 | | bank, MASK, BANK_BIT, false, 0
1090 | | );
| |_________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `unmap_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 132 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:132:16
|
132 | if prev & (prev - 1) == 0
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `prev.is_power_of_two()`
...
1056 | / map_region!(
1057 | | wb self,
1058 | | b_obj, 0x2_0000, 17, 2, bg_obj_updates,
1059 | | (
... |
1064 | | bank, MASK, BANK_BIT, 0
1065 | | );
| |_________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `map_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 260 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:260:16
|
260 | if new & (new - 1) == 0
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `new.is_power_of_two()`
...
1034 | / unmap_region!(
1035 | | wb self,
1036 | | b_bg, 0x2_0000, 15, 6, bg_obj_updates,
1037 | | (
... |
1043 | | bank, MASK, BANK_BIT, IS_MIRROR, region
1044 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `unmap_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 132 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:132:16
|
132 | if prev & (prev - 1) == 0
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `prev.is_power_of_two()`
...
1003 | / map_region!(
1004 | | wb self,
1005 | | b_bg, 0x2_0000, 15, 6, bg_obj_updates,
1006 | | (
... |
1012 | | bank, MASK, BANK_BIT, region
1013 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `map_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 260 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:260:16
|
260 | if new & (new - 1) == 0
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `new.is_power_of_two()`
...
907 | / unmap_region!(
908 | | wb self,
909 | | a_obj, 0x4_0000, 14, 0x18, bg_obj_updates,
910 | | (
... |
918 | | bank, MASK, BANK_BIT, IS_MIRROR, region
919 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `unmap_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 132 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:132:16
|
132 | if prev & (prev - 1) == 0
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `prev.is_power_of_two()`
...
874 | / map_region!(
875 | | wb self,
876 | | a_obj, 0x4_0000, 14, 0x18, bg_obj_updates,
877 | | (
... |
885 | | bank, MASK, BANK_BIT, region
886 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `map_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 260 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:260:16
|
260 | if new & (new - 1) == 0
| ^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `new.is_power_of_two()`
...
840 | / unmap_region!(
841 | | wb self,
842 | | a_bg, 0x8_0000, 14, 0x60, bg_obj_updates,
843 | | (
... |
853 | | bank, MASK, BANK_BIT, IS_MIRROR, region
854 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `unmap_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 132 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:132:16
|
132 | if prev & (prev - 1) == 0
| ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `prev.is_power_of_two()`
...
805 | / map_region!(
806 | | wb self,
807 | | a_bg, 0x8_0000, 14, 0x60, bg_obj_updates,
808 | | (
... |
818 | | bank, MASK, BANK_BIT, region
819 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `map_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 569 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:569:31
|
569 | } else if mapped & (mapped - 1) == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `mapped.is_power_of_two()`
...
728 | / restore_region!(
729 | | cpu_visible arm7, arm7_ptr_mask::R, arm7_ptr_mask::ALL,
730 | | arm7, 0x4_0000, 17, 0,
731 | | 0x0600_0000, 0x0700_0000,
... |
735 | | )
736 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `restore_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 569 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:569:31
|
569 | } else if mapped & (mapped - 1) == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `mapped.is_power_of_two()`
...
719 | / restore_region!(
720 | | cpu_visible arm9, ptr_mask::R, ptr_mask::R | ptr_mask::W_16_32,
721 | | b_obj, 0x2_0000, 17, 2,
722 | | 0x0660_0000, 0x0680_0000, bg_obj_updates,
... |
726 | | )
727 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `restore_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 569 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:569:31
|
569 | } else if mapped & (mapped - 1) == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `mapped.is_power_of_two()`
...
709 | / restore_region!(
710 | | cpu_visible arm9, ptr_mask::R, ptr_mask::R | ptr_mask::W_16_32,
711 | | b_bg, 0x2_0000, 15, 6,
712 | | 0x0620_0000, 0x0640_0000, bg_obj_updates,
... |
717 | | )
718 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `restore_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 569 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:569:31
|
569 | } else if mapped & (mapped - 1) == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `mapped.is_power_of_two()`
...
697 | / restore_region!(
698 | | cpu_visible arm9, ptr_mask::R, ptr_mask::R | ptr_mask::W_16_32,
699 | | a_obj, 0x4_0000, 14, 0x18,
700 | | 0x0640_0000, 0x0660_0000, bg_obj_updates,
... |
707 | | )
708 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `restore_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 569 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:569:31
|
569 | } else if mapped & (mapped - 1) == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `mapped.is_power_of_two()`
...
683 | / restore_region!(
684 | | cpu_visible arm9, ptr_mask::R, ptr_mask::R | ptr_mask::W_16_32,
685 | | a_bg, 0x8_0000, 14, 0x60,
686 | | 0x0600_0000, 0x0620_0000, bg_obj_updates,
... |
695 | | )
696 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `restore_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 619 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:619:31
|
619 | } else if mapped & (mapped - 1) == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `mapped.is_power_of_two()`
...
674 | / restore_region!(
675 | | tex_pal, 14,
676 | | (
677 | | 0 => e, 0xFFFF,
... |
680 | | )
681 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `restore_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 619 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:619:31
|
619 | } else if mapped & (mapped - 1) == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `mapped.is_power_of_two()`
...
665 | / restore_region!(
666 | | texture, 17,
667 | | (
668 | | 0 => a, 0x1_FFFF,
... |
672 | | )
673 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `restore_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 619 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:619:31
|
619 | } else if mapped & (mapped - 1) == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `mapped.is_power_of_two()`
...
658 | / restore_region!(
659 | | a_obj_ext_pal, 13,
660 | | (
661 | | 0 => f, 0x3FFF,
662 | | 1 => g, 0x3FFF,
663 | | )
664 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `restore_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 619 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:619:31
|
619 | } else if mapped & (mapped - 1) == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `mapped.is_power_of_two()`
...
650 | / restore_region!(
651 | | a_bg_ext_pal, 14,
652 | | (
653 | | 0 => e, 0xFFFF,
... |
656 | | )
657 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `restore_region` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 429 in core/src/gpu/vram/bank_cnt.rs
github-actions / Run clippy (ubuntu-latest, all features)
manually reimplementing `is_power_of_two`
warning: manually reimplementing `is_power_of_two`
--> core/src/gpu/vram/bank_cnt.rs:429:28
|
429 | && mapped & (mapped - 1) == 0
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `mapped.is_power_of_two()`
...
485 | / restore_region!(
486 | | arm9,
487 | | ptr_mask::R,
488 | | ptr_mask::R | ptr_mask::W_16_32,
... |
494 | | 0x0680_0000
495 | | );
| |_____________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: this warning originates in the macro `restore_region` (in Nightly builds, run with -Z macro-backtrace for more info)