Skip to content

Fix DLDI, other small changes #21

Fix DLDI, other small changes

Fix DLDI, other small changes #21

GitHub Actions / Run clippy (ubuntu-latest, no default features) succeeded Jan 7, 2024 in 0s

Run clippy (ubuntu-latest, no default features)

23 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 23
Note 0
Help 0

Versions

  • rustc 1.77.0-nightly (b6a8c762e 2024-01-06)
  • cargo 1.77.0-nightly (2ce45605d 2024-01-04)
  • clippy 0.1.77 (b6a8c76 2024-01-06)

Annotations

Check warning on line 587 in core/src/gpu/engine_3d.rs

See this annotation in the file changed.

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

returning the result of a `let` binding from a block

warning: returning the result of a `let` binding from a block
   --> core/src/gpu/engine_3d.rs:587:9
    |
580 |         let result = CMD_PARAMS[command as usize];
    |         ------------------------------------------ unnecessary `let` binding
...
587 |         result
    |         ^^^^^^
    |
    = 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
    |
580 ~         
581 |         #[cfg(feature = "log")]
  ...
586 |         }
587 ~         CMD_PARAMS[command as usize]
    |

Check warning on line 579 in core/src/gpu/engine_3d.rs

See this annotation in the file changed.

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

unused `self` argument

warning: unused `self` argument
   --> core/src/gpu/engine_3d.rs:579:27
    |
579 |     fn params_for_command(&self, command: u8) -> u8 {
    |                           ^^^^^
    |
    = help: consider refactoring to an associated function
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self

Check warning on line 422 in core/src/gpu/engine_3d/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
   --> core/src/gpu/engine_3d/io.rs:422:28
    |
422 |     pub(crate) fn write_32<A: AccessType, E: cpu::Engine>(
    |                            ^^^^^^^^^^^^^^^ help: consider removing the parameter
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 305 in core/src/gpu/engine_3d/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
   --> core/src/gpu/engine_3d/io.rs:305:28
    |
305 |     pub(crate) fn write_16<A: AccessType, E: cpu::Engine>(
    |                            ^^^^^^^^^^^^^^^ help: consider removing the parameter
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 146 in core/src/gpu/engine_3d/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
   --> core/src/gpu/engine_3d/io.rs:146:27
    |
146 |     pub(crate) fn write_8<A: AccessType, E: cpu::Engine>(emu: &mut Emu<E>, addr: u16, value: u8) {
    |                           ^^^^^^^^^^^^^^^ help: consider removing the parameter
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 115 in core/src/gpu/engine_3d/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
   --> core/src/gpu/engine_3d/io.rs:115:26
    |
115 |     pub(crate) fn read_32<A: AccessType>(&mut self, addr: u16) -> u32 {
    |                          ^^^^^^^^^^^^^^^ help: consider removing the parameter
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 75 in core/src/gpu/engine_3d/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
  --> core/src/gpu/engine_3d/io.rs:75:26
   |
75 |     pub(crate) fn read_16<A: AccessType>(&mut self, addr: u16) -> u16 {
   |                          ^^^^^^^^^^^^^^^ help: consider removing the parameter
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 30 in core/src/gpu/engine_3d/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
  --> core/src/gpu/engine_3d/io.rs:30:25
   |
30 |     pub(crate) fn read_8<A: AccessType>(&mut self, addr: u16) -> u8 {
   |                         ^^^^^^^^^^^^^^^ help: consider removing the parameter
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 314 in core/src/gpu/engine_2d/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
   --> core/src/gpu/engine_2d/io.rs:314:27
    |
314 |     pub(crate) fn write_32<A: AccessType>(&mut self, addr: u32, value: u32) {
    |                           ^^^^^^^^^^^^^^^ help: consider removing the parameter
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 204 in core/src/gpu/engine_2d/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
   --> core/src/gpu/engine_2d/io.rs:204:27
    |
204 |     pub(crate) fn write_16<A: AccessType>(&mut self, addr: u32, value: u16) {
    |                           ^^^^^^^^^^^^^^^ help: consider removing the parameter
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 88 in core/src/gpu/engine_2d/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
  --> core/src/gpu/engine_2d/io.rs:88:26
   |
88 |     pub(crate) fn write_8<A: AccessType>(&mut self, addr: u32, value: u8) {
   |                          ^^^^^^^^^^^^^^^ help: consider removing the parameter
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 63 in core/src/gpu/engine_2d/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
  --> core/src/gpu/engine_2d/io.rs:63:26
   |
63 |     pub(crate) fn read_32<A: AccessType>(&mut self, addr: u32) -> u32 {
   |                          ^^^^^^^^^^^^^^^ help: consider removing the parameter
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 37 in core/src/gpu/engine_2d/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
  --> core/src/gpu/engine_2d/io.rs:37:26
   |
37 |     pub(crate) fn read_16<A: AccessType>(&mut self, addr: u32) -> u16 {
   |                          ^^^^^^^^^^^^^^^ help: consider removing the parameter
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 8 in core/src/gpu/engine_2d/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
 --> core/src/gpu/engine_2d/io.rs:8:25
  |
8 |     pub(crate) fn read_8<A: AccessType>(&mut self, addr: u32) -> u8 {
  |                         ^^^^^^^^^^^^^^^ help: consider removing the parameter
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 335 in core/src/audio/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
   --> core/src/audio/io.rs:335:27
    |
335 |     pub(crate) fn write_32<A: AccessType>(&mut self, addr: u32, value: u32) {
    |                           ^^^^^^^^^^^^^^^ help: consider removing the parameter
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 256 in core/src/audio/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
   --> core/src/audio/io.rs:256:27
    |
256 |     pub(crate) fn write_16<A: AccessType>(&mut self, addr: u32, value: u16) {
    |                           ^^^^^^^^^^^^^^^ help: consider removing the parameter
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 125 in core/src/audio/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
   --> core/src/audio/io.rs:125:26
    |
125 |     pub(crate) fn write_8<A: AccessType>(&mut self, addr: u32, value: u8) {
    |                          ^^^^^^^^^^^^^^^ help: consider removing the parameter
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 94 in core/src/audio/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
  --> core/src/audio/io.rs:94:26
   |
94 |     pub(crate) fn read_32<A: AccessType>(&mut self, addr: u32) -> u32 {
   |                          ^^^^^^^^^^^^^^^ help: consider removing the parameter
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 54 in core/src/audio/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
  --> core/src/audio/io.rs:54:26
   |
54 |     pub(crate) fn read_16<A: AccessType>(&mut self, addr: u32) -> u16 {
   |                          ^^^^^^^^^^^^^^^ help: consider removing the parameter
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 5 in core/src/audio/io.rs

See this annotation in the file changed.

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

type parameter `A` goes unused in function definition

warning: type parameter `A` goes unused in function definition
 --> core/src/audio/io.rs:5:25
  |
5 |     pub(crate) fn read_8<A: AccessType>(&mut self, addr: u32) -> u8 {
  |                         ^^^^^^^^^^^^^^^ help: consider removing the parameter
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
  = note: `#[warn(clippy::extra_unused_type_parameters)]` on by default

Check warning on line 339 in core/src/audio/channel.rs

See this annotation in the file changed.

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

unused `self` argument

warning: unused `self` argument
   --> core/src/audio/channel.rs:339:25
    |
339 |     fn keep_last_sample(&mut self) {
    |                         ^^^^^^^^^
    |
    = help: consider refactoring to an associated function
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self

Check warning on line 258 in core/src/audio/channel.rs

See this annotation in the file changed.

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

unused `self` argument

warning: unused `self` argument
   --> core/src/audio/channel.rs:258:25
    |
258 |     fn check_total_size(&self) {
    |                         ^^^^^
    |
    = help: consider refactoring to an associated function
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self

Check warning on line 250 in core/src/audio/channel.rs

See this annotation in the file changed.

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

unused `self` argument

warning: unused `self` argument
   --> core/src/audio/channel.rs:250:25
    |
250 |     fn check_loop_start(&self) {
    |                         ^^^^^
    |
    = help: consider refactoring to an associated function
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_self
note: the lint level is defined here
   --> core/src/lib.rs:11:9
    |
11  | #![warn(clippy::pedantic)]
    |         ^^^^^^^^^^^^^^^^
    = note: `#[warn(clippy::unused_self)]` implied by `#[warn(clippy::pedantic)]`