Update Ubuntu runner #60
Run clippy (ubuntu-latest, no default features)
9 warnings
Details
Results
| Message level | Amount |
|---|---|
| Internal compiler error | 0 |
| Error | 0 |
| Warning | 9 |
| Note | 0 |
| Help | 0 |
Versions
- rustc 1.89.0-nightly (bf64d66bd 2025-05-21)
- cargo 1.89.0-nightly (47c911e9e 2025-05-14)
- clippy 0.1.89 (bf64d66bd5 2025-05-21)
Annotations
Check warning on line 736 in frontend/desktop/src/ui.rs
github-actions / Run clippy (ubuntu-latest, no default features)
this `map_or` can be simplified
warning: this `map_or` can be simplified
--> frontend/desktop/src/ui.rs:736:9
|
736 | self.emu.as_ref().map_or(false, |emu| emu.playing)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
736 - self.emu.as_ref().map_or(false, |emu| emu.playing)
736 + self.emu.as_ref().is_some_and(|emu| emu.playing)
|
Check warning on line 521 in frontend/desktop/src/ui/window.rs
github-actions / Run clippy (ubuntu-latest, no default features)
large size difference between variants
warning: large size difference between variants
--> frontend/desktop/src/ui/window.rs:518:1
|
518 | / enum WindowState {
519 | | New(NewWindow),
| | -------------- the second-largest variant contains at least 104 bytes
520 | | Shown(Window),
| | ------------- the largest variant contains at least 1120 bytes
521 | | }
| |_^ the entire enum is at least 1120 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
= note: `#[warn(clippy::large_enum_variant)]` implied by `#[warn(clippy::all)]`
help: consider boxing the large fields to reduce the total size of the enum
|
520 - Shown(Window),
520 + Shown(Box<Window>),
|
Check warning on line 310 in frontend/desktop/src/ui/savestate_editor.rs
github-actions / Run clippy (ubuntu-latest, no default features)
variables can be used directly in the `format!` string
warning: variables can be used directly in the `format!` string
--> frontend/desktop/src/ui/savestate_editor.rs:310:39
|
310 | warnings.push(format!("Couldn't load savestate at {:?}: {err}", path));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
310 - warnings.push(format!("Couldn't load savestate at {:?}: {err}", path));
310 + warnings.push(format!("Couldn't load savestate at {path:?}: {err}"));
|
Check warning on line 21 in frontend/desktop/src/ui/save_slot_editor.rs
github-actions / Run clippy (ubuntu-latest, no default features)
this `map_or` can be simplified
warning: this `map_or` can be simplified
--> frontend/desktop/src/ui/save_slot_editor.rs:21:13
|
21 | emu_state.as_ref().map_or(false, |emu| emu.game_loaded),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
21 - emu_state.as_ref().map_or(false, |emu| emu.game_loaded),
21 + emu_state.as_ref().is_some_and(|emu| emu.game_loaded),
|
Check warning on line 1926 in frontend/desktop/src/ui/config_editor.rs
github-actions / Run clippy (ubuntu-latest, no default features)
this `map_or` can be simplified
warning: this `map_or` can be simplified
--> frontend/desktop/src/ui/config_editor.rs:1926:33
|
1926 | self.data.game_loaded = emu_state.as_ref().map_or(false, |e| e.game_loaded);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
1926 - self.data.game_loaded = emu_state.as_ref().map_or(false, |e| e.game_loaded);
1926 + self.data.game_loaded = emu_state.as_ref().is_some_and(|e| e.game_loaded);
|
Check warning on line 1332 in frontend/desktop/src/ui/config_editor.rs
github-actions / Run clippy (ubuntu-latest, no default features)
this `map_or` can be simplified
warning: this `map_or` can be simplified
--> frontend/desktop/src/ui/config_editor.rs:1332:41
|
1332 | self.data.game_loaded = emu_state.as_ref().map_or(false, |e| e.game_loaded);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
1332 - self.data.game_loaded = emu_state.as_ref().map_or(false, |e| e.game_loaded);
1332 + self.data.game_loaded = emu_state.as_ref().is_some_and(|e| e.game_loaded);
|
Check warning on line 178 in frontend/desktop/src/ui/config_editor/input_map.rs
github-actions / Run clippy (ubuntu-latest, no default features)
this `map_or` can be simplified
warning: this `map_or` can be simplified
--> frontend/desktop/src/ui/config_editor/input_map.rs:176:16
|
176 | && trigger
| ________________^
177 | | .as_ref()
178 | | .map_or(false, |trigger| trigger.activated(&self.pressed_keys)))
| |_______________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `#[warn(clippy::unnecessary_map_or)]` implied by `#[warn(clippy::all)]`
help: use is_some_and instead
|
178 - .map_or(false, |trigger| trigger.activated(&self.pressed_keys)))
178 + .is_some_and(|trigger| trigger.activated(&self.pressed_keys)))
|
Check warning on line 136 in frontend/desktop/src/input/trigger.rs
github-actions / Run clippy (ubuntu-latest, no default features)
variables can be used directly in the `format!` string
warning: variables can be used directly in the `format!` string
--> frontend/desktop/src/input/trigger.rs:132:62
|
132 | Self::MismatchedOperators { expected, found } => write!(
| ______________________________________________________________^
133 | | f,
134 | | "mismatched operators: expected {}, found {}",
135 | | expected, found
136 | | ),
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
note: the lint level is defined here
--> frontend/desktop/src/main.rs:8:9
|
8 | #![warn(clippy::all)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::all)]`
Check warning on line 599 in frontend/desktop/src/ui/window.rs
github-actions / Run clippy (ubuntu-latest, no default 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