Skip to content

Update Ubuntu runner #60

Update Ubuntu runner

Update Ubuntu runner #60

GitHub Actions / Run clippy (ubuntu-latest, all features) succeeded May 22, 2025 in 0s

Run clippy (ubuntu-latest, all features)

16 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 16
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 1487 in frontend/desktop/src/ui.rs

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all features)

this `map_or` can be simplified

warning: this `map_or` can be simplified
    --> frontend/desktop/src/ui.rs:1482:46
     |
1482 |   ...                   let active = state.emu.as_ref().map_or(
     |  ____________________________________^
1483 | | ...                       false,
1484 | | ...                       |emu| emu.shared_state.gdb_server_active.load(
1485 | | ...                           Ordering::Relaxed,
1486 | | ...                       ),
1487 | | ...                   );
     | |_______________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
     |
1482 ~                                 let active = state.emu.as_ref().is_some_and(
1483 ~                                     |emu| emu.shared_state.gdb_server_active.load(
     |

Check warning on line 736 in frontend/desktop/src/ui.rs

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all 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

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all 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

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all 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

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all 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

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all 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

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all 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

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all 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
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 21 in frontend/desktop/src/emu/dldi.rs

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all features)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
  --> frontend/desktop/src/emu/dldi.rs:21:24
   |
21 |         base_path.join(format!("{}.bin", index))
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
21 -         base_path.join(format!("{}.bin", index))
21 +         base_path.join(format!("{index}.bin"))
   |

Check warning on line 136 in frontend/desktop/src/input/trigger.rs

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all 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: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::all)]`

Check warning on line 909 in frontend/desktop/src/debug_views/fs.rs

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all features)

this `map_or` can be simplified

warning: this `map_or` can be simplified
   --> frontend/desktop/src/debug_views/fs.rs:907:25
    |
907 | /                         export.finish_time.as_ref().map_or(true, |finish_time| {
908 | |                             now - *finish_time < InProgressExport::FADE_OUT_DURATION
909 | |                         })
    | |__________________________^
    |
    = 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_none_or instead
    |
907 -                         export.finish_time.as_ref().map_or(true, |finish_time| {
907 +                         export.finish_time.as_ref().is_none_or(|finish_time| {
    |

Check warning on line 736 in frontend/desktop/src/debug_views/bg_maps_2d.rs

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all features)

useless conversion to the same type: `debug_views::bg_maps_2d::BgFetchMode`

warning: useless conversion to the same type: `debug_views::bg_maps_2d::BgFetchMode`
   --> frontend/desktop/src/debug_views/bg_maps_2d.rs:736:44
    |
736 |         (self.selection.0, self.selection.1.map(Into::into))
    |                                            ^^^^^^^^^^^^^^^^ help: consider removing
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
note: the lint level is defined here
   --> frontend/desktop/src/main.rs:8:9
    |
8   | #![warn(clippy::all)]
    |         ^^^^^^^^^^^
    = note: `#[warn(clippy::useless_conversion)]` implied by `#[warn(clippy::all)]`

Check warning on line 599 in frontend/desktop/src/ui/window.rs

See this annotation in the file changed.

@github-actions 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 9 in core/src/cpu/disasm/arm/other.rs

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all features)

unnecessary semicolon

warning: unnecessary semicolon
  --> core/src/cpu/disasm/arm/other.rs:9:6
   |
9  |     };
   |      ^ help: remove
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon
note: the lint level is defined here
  --> core/src/lib.rs:12:9
   |
12 | #![warn(clippy::pedantic)]
   |         ^^^^^^^^^^^^^^^^
   = note: `#[warn(clippy::unnecessary_semicolon)]` implied by `#[warn(clippy::pedantic)]`

Check warning on line 906 in core/build.rs

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all features)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> core/build.rs:902:25
    |
902 | /                         write!(
903 | |                             file,
904 | |                             "ldm_stm::<{}, {}, {}, {}, {}>",
905 | |                             load, increment, base_excluded, writeback, s_bit
906 | |                         )
    | |_________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

Check warning on line 892 in core/build.rs

See this annotation in the file changed.

@github-actions github-actions / Run clippy (ubuntu-latest, all features)

variables can be used directly in the `format!` string

warning: variables can be used directly in the `format!` string
   --> core/build.rs:887:43
    |
887 |   ...                   WbOff::Imm => write!(
    |  _____________________________________^
888 | | ...                       file,
889 | | ...                       "load_store_wb::<{}, {}, {{WbOffTy::Imm}}, {}, \
890 | | ...                        {{WbAddressing::{}}}>",
891 | | ...                       load, byte, offset_upwards, addressing
892 | | ...                   ),
    | |_______________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    = note: `#[warn(clippy::uninlined_format_args)]` on by default