Skip to content

Bump web-sys from 0.3.72 to 0.3.76 #22

Bump web-sys from 0.3.72 to 0.3.76

Bump web-sys from 0.3.72 to 0.3.76 #22

Triggered via push December 9, 2024 15:54
Status Success
Total duration 2m 37s
Artifacts

rust.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

58 warnings
format
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
casting to the same type is unnecessary (`usize` -> `usize`): sdl-gui/src/gui.rs#L71
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> sdl-gui/src/gui.rs:71:25 | 71 | let i = (y * 160 + x) as usize; | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `(y * 160 + x)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
unneeded unit expression: libretro/src/lib.rs#L151
warning: unneeded unit expression --> libretro/src/lib.rs:151:9 | 151 | () | ^^ help: remove the final `()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default
creating a mutable reference to mutable static is discouraged: wasm-gui/src/lib.rs#L90
warning: creating a mutable reference to mutable static is discouraged --> wasm-gui/src/lib.rs:90:19 | 90 | let cpu = CPU.as_mut().unwrap(); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: wasm-gui/src/lib.rs#L64
warning: creating a mutable reference to mutable static is discouraged --> wasm-gui/src/lib.rs:64:26 | 64 | let frame = unsafe { CPU.as_mut().unwrap().gpu.finished_frame }; | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives
creating a mutable reference to mutable static is discouraged: wasm-gui/src/lib.rs#L58
warning: creating a mutable reference to mutable static is discouraged --> wasm-gui/src/lib.rs:58:9 | 58 | CPU.as_mut().unwrap().step_one_frame(); | ^^^^^^^^^^^^ mutable reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives = note: `#[warn(static_mut_refs)]` on by default
this function has too many arguments (8/7): wasm-gui/src/lib.rs#L79
warning: this function has too many arguments (8/7) --> wasm-gui/src/lib.rs:79:1 | 79 | / pub fn set_control_state( 80 | | a: bool, 81 | | b: bool, 82 | | up: bool, ... | 87 | | select: bool, 88 | | ) { | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: `#[warn(clippy::too_many_arguments)]` on by default
the loop variable `i` is only used to index `frame`: wasm-gui/src/lib.rs#L68
warning: the loop variable `i` is only used to index `frame` --> wasm-gui/src/lib.rs:68:14 | 68 | for i in 0..SCREEN_BUFFER_SIZE { | ^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop = note: `#[warn(clippy::needless_range_loop)]` on by default help: consider using an iterator | 68 | for <item> in frame.iter().take(SCREEN_BUFFER_SIZE) { | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
casting to the same type is unnecessary (`usize` -> `usize`): wasm-gui/src/lib.rs#L41
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> wasm-gui/src/lib.rs:41:25 | 41 | vec![0; expected_size as usize] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `expected_size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
you should consider adding a `Default` implementation for `VolumeEnvelope`: core/src/sound/volume_envelope.rs#L65
warning: you should consider adding a `Default` implementation for `VolumeEnvelope` --> core/src/sound/volume_envelope.rs:65:5 | 65 | / pub fn new() -> VolumeEnvelope { 66 | | VolumeEnvelope { 67 | | initial_volume: 0, 68 | | direction: EnvelopeDirection::Down, ... | 73 | | } 74 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 19 + impl Default for VolumeEnvelope { 20 + fn default() -> Self { 21 + Self::new() 22 + } 23 + } |
you should consider adding a `Default` implementation for `LengthFunction`: core/src/sound/length_function.rs#L45
warning: you should consider adding a `Default` implementation for `LengthFunction` --> core/src/sound/length_function.rs:45:5 | 45 | / pub fn new() -> LengthFunction { 46 | | LengthFunction { 47 | | channel_enabled: true, 48 | | timer: 0, ... | 52 | | } 53 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 12 + impl Default for LengthFunction { 13 + fn default() -> Self { 14 + Self::new() 15 + } 16 + } |
this match could be replaced by its body itself: core/src/sound/channel4.rs#L80
warning: this match could be replaced by its body itself --> core/src/sound/channel4.rs:80:9 | 80 | / match address { 81 | | _ => 0, //panic!("Unimplemented APU Channel 4 read {:#06x}", address) 82 | | } | |_________^ help: consider using the match body instead: `0` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding
you should consider adding a `Default` implementation for `APUChannel4`: core/src/sound/channel4.rs#L22
warning: you should consider adding a `Default` implementation for `APUChannel4` --> core/src/sound/channel4.rs:22:5 | 22 | / pub fn new() -> APUChannel4 { 23 | | APUChannel4 { 24 | | frequency_timer: 1, 25 | | length_function: LengthFunction::new(), ... | 31 | | } 32 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 21 + impl Default for APUChannel4 { 22 + fn default() -> Self { 23 + Self::new() 24 + } 25 + } |
manual implementation of an assign operation: core/src/sound/channel3.rs#L115
warning: manual implementation of an assign operation --> core/src/sound/channel3.rs:115:9 | 115 | / wave_nibble = wave_nibble 116 | | >> match self.volume_shift { 117 | | 0 => 4, 118 | | 1 => 0, ... | 121 | | _ => unreachable!(), 122 | | }; | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern help: replace it with | 115 ~ wave_nibble >>= match self.volume_shift { 116 + 0 => 4, 117 + 1 => 0, 118 + 2 => 1, 119 + 3 => 2, 120 + _ => unreachable!(), 121 ~ }; |
you should consider adding a `Default` implementation for `APUChannel3`: core/src/sound/channel3.rs#L18
warning: you should consider adding a `Default` implementation for `APUChannel3` --> core/src/sound/channel3.rs:18:5 | 18 | / pub fn new() -> APUChannel3 { 19 | | APUChannel3 { 20 | | frequency: 0, 21 | | frequency_timer: 1, ... | 27 | | } 28 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 17 + impl Default for APUChannel3 { 18 + fn default() -> Self { 19 + Self::new() 20 + } 21 + } |
this match could be replaced by its body itself: core/src/sound/channel2.rs#L66
warning: this match could be replaced by its body itself --> core/src/sound/channel2.rs:66:9 | 66 | / match address { 67 | | _ => 0, //panic!("Unimplemented APU Channel 2 read {:#06x}", address) 68 | | } | |_________^ help: consider using the match body instead: `0` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding
you should consider adding a `Default` implementation for `APUChannel2`: core/src/sound/channel2.rs#L18
warning: you should consider adding a `Default` implementation for `APUChannel2` --> core/src/sound/channel2.rs:18:5 | 18 | / pub fn new() -> APUChannel2 { 19 | | APUChannel2 { 20 | | frequency: 0, 21 | | frequency_timer: 1, ... | 26 | | } 27 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 17 + impl Default for APUChannel2 { 18 + fn default() -> Self { 19 + Self::new() 20 + } 21 + } |
this match could be replaced by its body itself: core/src/sound/channel1.rs#L159
warning: this match could be replaced by its body itself --> core/src/sound/channel1.rs:159:9 | 159 | / match address { 160 | | _ => 0, //panic!("Unimplemented APU Channel 2 read {:#06x}", address) 161 | | } | |_________^ help: consider using the match body instead: `0` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding = note: `#[warn(clippy::match_single_binding)]` on by default
manual implementation of an assign operation: core/src/sound/channel1.rs#L87
warning: manual implementation of an assign operation --> core/src/sound/channel1.rs:87:13 | 87 | new_frequency = self.shadow_frequency + new_frequency; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `new_frequency += self.shadow_frequency` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
you should consider adding a `Default` implementation for `APUChannel1`: core/src/sound/channel1.rs#L37
warning: you should consider adding a `Default` implementation for `APUChannel1` --> core/src/sound/channel1.rs:37:5 | 37 | / pub fn new() -> APUChannel1 { 38 | | APUChannel1 { 39 | | enabled: false, 40 | | frequency: 0, ... | 53 | | } 54 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 36 + impl Default for APUChannel1 { 37 + fn default() -> Self { 38 + Self::new() 39 + } 40 + } |
you should consider adding a `Default` implementation for `APU`: core/src/sound/apu.rs#L175
warning: you should consider adding a `Default` implementation for `APU` --> core/src/sound/apu.rs:175:5 | 175 | / pub fn new() -> APU { 176 | | APU { 177 | | // These might be meant to start 0, not sure 178 | | stereo_left_volume: 1., ... | 192 | | } 193 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 38 + impl Default for APU { 39 + fn default() -> Self { 40 + Self::new() 41 + } 42 + } |
you should consider adding a `Default` implementation for `SerialCable`: core/src/serial_cable.rs#L58
warning: you should consider adding a `Default` implementation for `SerialCable` --> core/src/serial_cable.rs:58:5 | 58 | / pub fn new() -> SerialCable { 59 | | SerialCable { 60 | | transfer_data_byte: 0, 61 | | transfer_control_byte: 0, ... | 65 | | } 66 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 18 + impl Default for SerialCable { 19 + fn default() -> Self { 20 + Self::new() 21 + } 22 + } |
this expression creates a reference which is immediately dereferenced by the compiler: core/src/memory/memory.rs#L297
warning: this expression creates a reference which is immediately dereferenced by the compiler --> core/src/memory/memory.rs:297:42 | 297 | palette_ram: PaletteRam::new(&target), | ^^^^^^^ help: change this to: `target` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
module has the same name as its containing module: core/src/memory/mod.rs#L4
warning: module has the same name as its containing module --> core/src/memory/mod.rs:4:1 | 4 | pub mod memory; | ^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
manual implementation of an assign operation: core/src/memory/mbcs/mbc3.rs#L45
warning: manual implementation of an assign operation --> core/src/memory/mbcs/mbc3.rs:45:17 | 45 | n = n & bitmask; | ^^^^^^^^^^^^^^^ help: replace it with: `n &= bitmask` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern = note: `#[warn(clippy::assign_op_pattern)]` on by default
you should consider adding a `Default` implementation for `LcdStatus`: core/src/lcd.rs#L103
warning: you should consider adding a `Default` implementation for `LcdStatus` --> core/src/lcd.rs:103:5 | 103 | / pub fn new() -> LcdStatus { 104 | | // LCD starts in OAMSearch, not HBlank 105 | | LcdStatus::from(0b000000_10) 106 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 64 + impl Default for LcdStatus { 65 + fn default() -> Self { 66 + Self::new() 67 + } 68 + } |
you should consider adding a `Default` implementation for `LcdControl`: core/src/lcd.rs#L15
warning: you should consider adding a `Default` implementation for `LcdControl` --> core/src/lcd.rs:15:5 | 15 | / pub fn new() -> LcdControl { 16 | | // This value is set by the DMG boot rom. 17 | | LcdControl::from(0b10000101) 18 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 14 + impl Default for LcdControl { 15 + fn default() -> Self { 16 + Self::new() 17 + } 18 + } |
you should consider adding a `Default` implementation for `Joypad`: core/src/joypad.rs#L71
warning: you should consider adding a `Default` implementation for `Joypad` --> core/src/joypad.rs:71:5 | 71 | / pub fn new() -> Joypad { 72 | | Joypad { 73 | | readout_mode: JoypadReadoutMode::Buttons, 74 | | up_pressed: false, ... | 82 | | } 83 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 23 + impl Default for Joypad { 24 + fn default() -> Self { 25 + Self::new() 26 + } 27 + } |
you should consider adding a `Default` implementation for `Interrupts`: core/src/interrupts.rs#L104
warning: you should consider adding a `Default` implementation for `Interrupts` --> core/src/interrupts.rs:104:5 | 104 | / pub fn new() -> Interrupts { 105 | | Interrupts { 106 | | enable: InterruptFields::new(), 107 | | flag: InterruptFields::new(), ... | 110 | | } 111 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 71 + impl Default for Interrupts { 72 + fn default() -> Self { 73 + Self::new() 74 + } 75 + } |
you should consider adding a `Default` implementation for `InterruptFields`: core/src/interrupts.rs#L31
warning: you should consider adding a `Default` implementation for `InterruptFields` --> core/src/interrupts.rs:31:5 | 31 | / pub fn new() -> InterruptFields { 32 | | InterruptFields { 33 | | v_blank: false, 34 | | lcd_stat: false, ... | 38 | | } 39 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 29 + impl Default for InterruptFields { 30 + fn default() -> Self { 31 + Self::new() 32 + } 33 + } |
using `clone` on type `[Colour; 23040]` which implements the `Copy` trait: core/src/gpu.rs#L735
warning: using `clone` on type `[Colour; 23040]` which implements the `Copy` trait --> core/src/gpu.rs:735:29 | 735 | finished_frame: empty_frame.clone(), | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `empty_frame` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `#[warn(clippy::clone_on_copy)]` on by default
returning the result of a `let` binding from a block: core/src/gpu.rs#L471
warning: returning the result of a `let` binding from a block --> core/src/gpu.rs:471:9 | 469 | let pixel_colour_id = (u << 1) | l; | ----------------------------------- unnecessary `let` binding 470 | 471 | pixel_colour_id | ^^^^^^^^^^^^^^^ | = 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 | 469 ~ 470 | 471 ~ (u << 1) | l |
unneeded late initialization: core/src/cpu.rs#L251
warning: unneeded late initialization --> core/src/cpu.rs:251:9 | 251 | let cycles: usize; | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init = note: `#[warn(clippy::needless_late_init)]` on by default help: move the declaration `cycles` here and remove the assignments from the branches | 251 ~ 252 | 253 ~ let cycles: usize = if self.halted { 254 ~ 4 255 | } else { ... 280 | 281 ~ match op { 282 | 0 => 4, ... 747 | ), 748 ~ } 749 ~ }; |
unneeded `return` statement: core/src/cpu.rs#L766
warning: unneeded `return` statement --> core/src/cpu.rs:766:9 | 766 | return cycles; | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 766 - return cycles; 766 + cycles |
module has the same name as its containing module: core/src/colour/mod.rs#L2
warning: module has the same name as its containing module --> core/src/colour/mod.rs:2:1 | 2 | pub mod colour; | ^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception = note: `#[warn(clippy::module_inception)]` on by default
you should consider adding a `Default` implementation for `BgMapAttributeTable`: core/src/colour/bg_map_attributes.rs#L78
warning: you should consider adding a `Default` implementation for `BgMapAttributeTable` --> core/src/colour/bg_map_attributes.rs:78:5 | 78 | / pub fn new() -> BgMapAttributeTable { 79 | | BgMapAttributeTable { 80 | | entries: [BgMapAttributeEntry::new(); BG_MAP_ATTRIBUTE_TABLE_SIZE], 81 | | } 82 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 65 + impl Default for BgMapAttributeTable { 66 + fn default() -> Self { 67 + Self::new() 68 + } 69 + } |
you should consider adding a `Default` implementation for `BgMapAttributeEntry`: core/src/colour/bg_map_attributes.rs#L49
warning: you should consider adding a `Default` implementation for `BgMapAttributeEntry` --> core/src/colour/bg_map_attributes.rs:49:5 | 49 | / pub fn new() -> BgMapAttributeEntry { 50 | | BgMapAttributeEntry { 51 | | priority: false, 52 | | y_flip: false, ... | 57 | | } 58 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 18 + impl Default for BgMapAttributeEntry { 19 + fn default() -> Self { 20 + Self::new() 21 + } 22 + } |
you should consider adding a `Default` implementation for `CgbDmaConfig`: core/src/cgb_dma.rs#L78
warning: you should consider adding a `Default` implementation for `CgbDmaConfig` --> core/src/cgb_dma.rs:78:5 | 78 | / pub fn new() -> CgbDmaConfig { 79 | | CgbDmaConfig { 80 | | source: 0, 81 | | dest: 0, ... | 86 | | } 87 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 16 + impl Default for CgbDmaConfig { 17 + fn default() -> Self { 18 + Self::new() 19 + } 20 + } |
the loop variable `i` is only used to index `buffer`: core/src/cartridge.rs#L73
warning: the loop variable `i` is only used to index `buffer` --> core/src/cartridge.rs:73:14 | 73 | for i in 0x0134..=0x0143 { | ^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop = note: `#[warn(clippy::needless_range_loop)]` on by default help: consider using an iterator | 73 | for <item> in buffer.iter().take(0x0143 + 1).skip(0x0134) { | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: core/src/cartridge.rs#L71
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> core/src/cartridge.rs:71:22 | 71 | fn get_title(buffer: &Vec<u8>) -> String { | ^^^^^^^^ help: change this to: `&[u8]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` on by default
this `if` statement can be collapsed: core/src/sound/length_function.rs#L34
warning: this `if` statement can be collapsed --> core/src/sound/length_function.rs:34:9 | 34 | / if self.timer == 0 { 35 | | if self.timer_enabled { 36 | | // TODO: Without saturating_sub, this causes panics after moving to 37 | | // 48KHz audio when flapping with the rabbit ears in Mario Land 2 ... | 41 | | } 42 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `#[warn(clippy::collapsible_if)]` on by default help: collapse nested if block | 34 ~ if self.timer == 0 && self.timer_enabled { 35 + // TODO: Without saturating_sub, this causes panics after moving to 36 + // 48KHz audio when flapping with the rabbit ears in Mario Land 2 37 + self.timer = 64; 38 + self.timer = self.timer.saturating_sub(self.data); 39 + self.channel_enabled = false; 40 + } |
digits of hex, binary or octal literal not in groups of equal size: core/src/sound/apu.rs#L161
warning: digits of hex, binary or octal literal not in groups of equal size --> core/src/sound/apu.rs:161:32 | 161 | let left_vol = (nr50 & 0b111_0_000) >> 4; | ^^^^^^^^^^^ help: consider: `0b111_0000` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
digits of hex, binary or octal literal not in groups of equal size: core/src/lcd.rs#L105
warning: digits of hex, binary or octal literal not in groups of equal size --> core/src/lcd.rs:105:25 | 105 | LcdStatus::from(0b000000_10) | ^^^^^^^^^^^ help: consider: `0b0000_0010` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
this `else { if .. }` block can be collapsed: core/src/gpu.rs#L674
warning: this `else { if .. }` block can be collapsed --> core/src/gpu.rs:674:24 | 674 | } else { | ________________________^ 675 | | if self.cgb_features { 676 | | let colour = mem.palette_ram.get_obj_palette_colour( 677 | | sprite.cgb_palette as u16, ... | 691 | | } 692 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if help: collapse nested if block | 674 ~ } else if self.cgb_features { 675 + let colour = mem.palette_ram.get_obj_palette_colour( 676 + sprite.cgb_palette as u16, 677 + col_id, 678 + ); 679 + maybe_colour = Some(colour) 680 + } else { 681 + let palette = if sprite.use_palette_0 { 682 + self.sprite_pallete_1 683 + } else { 684 + self.sprite_pallete_2 685 + }; 686 + 687 + min_x = sprite.x_pos; 688 + maybe_colour = 689 + Some(self.get_shade_from_colour_id(col_id, palette)) 690 + } |
this `else { if .. }` block can be collapsed: core/src/gpu.rs#L636
warning: this `else { if .. }` block can be collapsed --> core/src/gpu.rs:636:28 | 636 | } else { | ____________________________^ 637 | | if sprite.y_flip { 638 | | pattern = sprite.pattern_id | 0x01; 639 | | } else { 640 | | pattern = sprite.pattern_id & 0xFE; 641 | | } 642 | | } | |_____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if help: collapse nested if block | 636 ~ } else if sprite.y_flip { 637 + pattern = sprite.pattern_id | 0x01; 638 + } else { 639 + pattern = sprite.pattern_id & 0xFE; 640 + } |
this `else { if .. }` block can be collapsed: core/src/gpu.rs#L392
warning: this `else { if .. }` block can be collapsed --> core/src/gpu.rs:392:20 | 392 | } else { | ____________________^ 393 | | if mode != LcdMode::OAMSearch { 394 | | self.status.set_mode(LcdMode::OAMSearch); 395 | | self.cache_all_sprites(); 396 | | self.draw_line_if_necessary(ints, mem); 397 | | } 398 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if help: collapse nested if block | 392 ~ } else if mode != LcdMode::OAMSearch { 393 + self.status.set_mode(LcdMode::OAMSearch); 394 + self.cache_all_sprites(); 395 + self.draw_line_if_necessary(ints, mem); 396 + } |
digits of hex, binary or octal literal not in groups of equal size: core/src/cpu.rs#L604
warning: digits of hex, binary or octal literal not in groups of equal size --> core/src/cpu.rs:604:43 | 604 | let condition = (op & 0b000_11_000) >> 3; | ^^^^^^^^^^^^ help: consider: `0b0001_1000` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
digits of hex, binary or octal literal not in groups of equal size: core/src/cpu.rs#L582
warning: digits of hex, binary or octal literal not in groups of equal size --> core/src/cpu.rs:582:43 | 582 | let condition = (op & 0b000_11_000) >> 3; | ^^^^^^^^^^^^ help: consider: `0b0001_1000` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
digits of hex, binary or octal literal not in groups of equal size: core/src/cpu.rs#L556
warning: digits of hex, binary or octal literal not in groups of equal size --> core/src/cpu.rs:556:43 | 556 | let condition = (op & 0b000_11_000) >> 3; | ^^^^^^^^^^^^ help: consider: `0b0001_1000` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
digits of hex, binary or octal literal not in groups of equal size: core/src/cpu.rs#L442
warning: digits of hex, binary or octal literal not in groups of equal size --> core/src/cpu.rs:442:41 | 442 | let is_inc = ((op & 0b000_1_0000) >> 4) == 0; | ^^^^^^^^^^^^ help: consider: `0b0001_0000` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
digits of hex, binary or octal literal not in groups of equal size: core/src/cpu.rs#L423
warning: digits of hex, binary or octal literal not in groups of equal size --> core/src/cpu.rs:423:41 | 423 | let is_inc = ((op & 0b000_1_0000) >> 4) == 0; | ^^^^^^^^^^^^ help: consider: `0b0001_0000` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
digits of hex, binary or octal literal not in groups of equal size: core/src/cpu.rs#L402
warning: digits of hex, binary or octal literal not in groups of equal size --> core/src/cpu.rs:402:43 | 402 | let condition = (op & 0b000_11_000) >> 3; | ^^^^^^^^^^^^ help: consider: `0b0001_1000` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
digits of hex, binary or octal literal not in groups of equal size: core/src/cpu.rs#L367
warning: digits of hex, binary or octal literal not in groups of equal size --> core/src/cpu.rs:367:40 | 367 | let carry = ((op & 0b000_1_0000) >> 4) != 1; | ^^^^^^^^^^^^ help: consider: `0b0001_0000` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
digits of hex, binary or octal literal not in groups of equal size: core/src/cpu.rs#L366
warning: digits of hex, binary or octal literal not in groups of equal size --> core/src/cpu.rs:366:38 | 366 | let dir = ((op & 0b0000_1_000) >> 3) == 1; | ^^^^^^^^^^^^ help: consider: `0b0000_1000` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
digits of hex, binary or octal literal not in groups of equal size: core/src/cpu.rs#L275
warning: digits of hex, binary or octal literal not in groups of equal size --> core/src/cpu.rs:275:32 | 275 | let v_d_alt = op & 0b00000_111; | ^^^^^^^^^^^ help: consider: `0b0000_0111` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings
digits of hex, binary or octal literal not in groups of equal size: core/src/cpu.rs#L273
warning: digits of hex, binary or octal literal not in groups of equal size --> core/src/cpu.rs:273:29 | 273 | let v_r = (op & 0b00_11_0000) >> 4; | ^^^^^^^^^^^^ help: consider: `0b0011_0000` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unusual_byte_groupings = note: `#[warn(clippy::unusual_byte_groupings)]` on by default
this `else { if .. }` block can be collapsed: core/src/alu.rs#L210
warning: this `else { if .. }` block can be collapsed --> core/src/alu.rs:210:16 | 210 | } else { | ________________^ 211 | | if carry { 212 | | self.alu_rrc(a) 213 | | } else { 214 | | self.alu_rr(a) 215 | | } 216 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 210 ~ } else if carry { 211 + self.alu_rrc(a) 212 + } else { 213 + self.alu_rr(a) 214 + } |
build
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636