Repository navigation
PP5020 APB/AHB DMA CSR - #106
clippy
29 warnings
Details
Results
| Message level | Amount |
|---|---|
| Internal compiler error | 0 |
| Error | 0 |
| Warning | 29 |
| Note | 0 |
| Help | 0 |
Versions
- rustc 1.99.0 (b940084d7 2026-09-28)
- cargo 1.99.0 (5f94df478 2026-08-27)
- clippy 0.1.99 (b940084d7e 2026-09-28)
Annotations
Check warning on line 206 in clicky-core/src/devices/platform/pp/clcd.rs
github-actions / clippy
there is no need to manually implement bit rotation
warning: there is no need to manually implement bit rotation
--> clicky-core/src/devices/platform/pp/clcd.rs:206:59
|
206 | let _ = self.controller()?.write_data(val as u16 >> 8 | (val as u16) << 8);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: this expression can be rewritten as: `(val as u16).rotate_left(8)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#manual_rotate
= note: `#[warn(clippy::manual_rotate)]` on by default
Check warning on line 183 in clicky-core/src/devices/platform/pp/clcd.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> clicky-core/src/devices/platform/pp/clcd.rs:183:29
|
183 | ... return self.controller()?.write_data(cmd16);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#needless_return
help: remove `return`
|
183 ~ self.controller()?.write_data(cmd16)
184 | }
185 | }
186 ~ }
|
Check warning on line 181 in clicky-core/src/devices/platform/pp/clcd.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> clicky-core/src/devices/platform/pp/clcd.rs:181:29
|
181 | ... return self.controller()?.write_command(cmd16);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#needless_return
help: remove `return`
|
181 ~ self.controller()?.write_command(cmd16)
182 | } else {
...
185 | }
186 ~ }
|
Check warning on line 176 in clicky-core/src/devices/platform/pp/clcd.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> clicky-core/src/devices/platform/pp/clcd.rs:176:25
|
176 | return Ok(());
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#needless_return
help: remove `return`
|
176 ~ Ok(())
177 | }
...
185 | }
186 ~ }
|
Check warning on line 148 in clicky-core/src/devices/platform/pp/clcd.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> clicky-core/src/devices/platform/pp/clcd.rs:148:18
|
148 | _ => return Err(Unexpected),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
148 - _ => return Err(Unexpected),
148 + _ => Err(Unexpected),
|
Check warning on line 653 in clicky-core/src/devices/generic/ide/mod.rs
github-actions / clippy
this block may be rewritten with the `?` operator
warning: this block may be rewritten with the `?` operator
--> clicky-core/src/devices/generic/ide/mod.rs:650:21
|
650 | / if let Err(e) = self.blockdev.seek(io::SeekFrom::Start(offset * 512)).await {
651 | | // XXX: actually set error bits
652 | | return Err(e);
653 | | }
| |_____________________^ help: replace it with: `self.blockdev.seek(io::SeekFrom::Start(offset * 512)).await?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#question_mark
Check warning on line 569 in clicky-core/src/devices/generic/ide/mod.rs
github-actions / clippy
this block may be rewritten with the `?` operator
warning: this block may be rewritten with the `?` operator
--> clicky-core/src/devices/generic/ide/mod.rs:566:21
|
566 | / if let Err(e) = self.blockdev.read_exact(self.iobuf.as_raw()).await {
567 | | // XXX: actually set error bits
568 | | return Err(e);
569 | | }
| |_____________________^ help: replace it with: `self.blockdev.read_exact(self.iobuf.as_raw()).await?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#question_mark
Check warning on line 561 in clicky-core/src/devices/generic/ide/mod.rs
github-actions / clippy
this block may be rewritten with the `?` operator
warning: this block may be rewritten with the `?` operator
--> clicky-core/src/devices/generic/ide/mod.rs:558:21
|
558 | / if let Err(e) = self.blockdev.seek(io::SeekFrom::Start(offset * 512)).await {
559 | | // XXX: actually set error bits
560 | | return Err(e);
561 | | }
| |_____________________^ help: replace it with: `self.blockdev.seek(io::SeekFrom::Start(offset * 512)).await?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#question_mark
Check warning on line 421 in clicky-core/src/devices/generic/ide/mod.rs
github-actions / clippy
this block may be rewritten with the `?` operator
warning: this block may be rewritten with the `?` operator
--> clicky-core/src/devices/generic/ide/mod.rs:418:17
|
418 | / if let Err(e) = self.blockdev.write_all(self.iobuf.as_raw()).await {
419 | | // XXX: actually set error bits
420 | | return Err(e);
421 | | }
| |_________________^ help: replace it with: `self.blockdev.write_all(self.iobuf.as_raw()).await?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#question_mark
Check warning on line 369 in clicky-core/src/devices/generic/ide/mod.rs
github-actions / clippy
this block may be rewritten with the `?` operator
warning: this block may be rewritten with the `?` operator
--> clicky-core/src/devices/generic/ide/mod.rs:366:21
|
366 | / if let Err(e) = self.blockdev.read_exact(self.iobuf.as_raw()).await {
367 | | // XXX: actually set error bits
368 | | return Err(e);
369 | | }
| |_____________________^ help: replace it with: `self.blockdev.read_exact(self.iobuf.as_raw()).await?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#question_mark
= note: `#[warn(clippy::question_mark)]` on by default
Check warning on line 321 in clicky-core/src/devices/generic/ide/mod.rs
github-actions / clippy
casting to the same type is unnecessary (`u64` -> `u64`)
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> clicky-core/src/devices/generic/ide/mod.rs:321:13
|
321 | ((cyl * NUM_HEADS as u64 + head) * NUM_SECTORS as u64 + sector) as u64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((cyl * NUM_HEADS as u64 + head) * NUM_SECTORS as u64 + sector)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
Check warning on line 157 in clicky-core/src/devices/display/lr38825.rs
github-actions / clippy
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> clicky-core/src/devices/display/lr38825.rs:154:9
|
154 | / match ireg.cmd {
155 | | 0..=254 => {trace!(target: "LCD", "write_command cmd:{:x} val:0x{:x}({})", ireg.cmd, val, val);}
156 | | _ => {}
157 | | }
| |_________^ help: try: `if let 0..=254 = ireg.cmd {trace!(target: "LCD", "write_command cmd:{:x} val:0x{:x}({})", ireg.cmd, val, val);}`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
Check warning on line 238 in clicky-core/src/devices/display/hd66753.rs
github-actions / clippy
using `chunks_exact_mut` with a constant chunk size
warning: using `chunks_exact_mut` with a constant chunk size
--> clicky-core/src/devices/display/hd66753.rs:238:32
|
238 | for row in buf.chunks_exact_mut(CGRAM_WIDTH) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `as_chunks_mut` instead: `as_chunks_mut::<CGRAM_WIDTH>().0`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#chunks_exact_to_as_chunks
Check warning on line 180 in clicky-core/src/devices/display/hd66753.rs
github-actions / clippy
using `chunks_exact` with a constant chunk size
warning: using `chunks_exact` with a constant chunk size
--> clicky-core/src/devices/display/hd66753.rs:180:22
|
180 | .chunks_exact(EMU_CGRAM_WIDTH * 2 / 8 / 2)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `as_chunks` instead: `as_chunks::<{ EMU_CGRAM_WIDTH * 2 / 8 / 2 }>().0.iter()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#chunks_exact_to_as_chunks
= note: `#[warn(clippy::chunks_exact_to_as_chunks)]` on by default
Check warning on line 172 in clicky-core/src/devices/display/hd66753.rs
github-actions / clippy
manual implementation of `.is_multiple_of()`
warning: manual implementation of `.is_multiple_of()`
--> clicky-core/src/devices/display/hd66753.rs:172:28
|
172 | let blink_on = (start.elapsed().as_millis() / 500) % 2 == 0;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `(start.elapsed().as_millis() / 500).is_multiple_of(2)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#manual_is_multiple_of
= note: `#[warn(clippy::manual_is_multiple_of)]` on by default
Check warning on line 159 in clicky-core/src/devices/display/hd66753.rs
github-actions / clippy
using `clone` on type `Option<LcdPanel>` which implements the `Copy` trait
warning: using `clone` on type `Option<LcdPanel>` which implements the `Copy` trait
--> clicky-core/src/devices/display/hd66753.rs:159:21
|
159 | let panel = self.panel.clone();
| ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.panel`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
Check warning on line 77 in clicky-core/src/sys/ipod4g/hle_bootloader/firmware.rs
github-actions / clippy
fields `id`, `checksum`, `vers`, and `load_addr` are never read
warning: fields `id`, `checksum`, `vers`, and `load_addr` are never read
--> clicky-core/src/sys/ipod4g/hle_bootloader/firmware.rs:77:9
|
74 | pub struct ImageInfo {
| --------- fields in this struct
...
77 | pub id: u32,
| ^^
...
82 | pub checksum: u32,
| ^^^^^^^^
83 | pub vers: u32,
| ^^^^
84 | pub load_addr: u32,
| ^^^^^^^^^
|
= note: `ImageInfo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
Check warning on line 50 in clicky-core/src/sys/ipod4g/hle_bootloader/firmware.rs
github-actions / clippy
field `ext_header_loc` is never read
warning: field `ext_header_loc` is never read
--> clicky-core/src/sys/ipod4g/hle_bootloader/firmware.rs:50:9
|
47 | pub struct VolumeHeader {
| ------------ field in this struct
...
50 | pub ext_header_loc: u16,
| ^^^^^^^^^^^^^^
|
= note: `VolumeHeader` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
Check warning on line 12 in clicky-core/src/sys/ipod4g/hle_bootloader/firmware.rs
github-actions / clippy
field `header` is never read
warning: field `header` is never read
--> clicky-core/src/sys/ipod4g/hle_bootloader/firmware.rs:12:9
|
11 | pub struct FirmwareMeta {
| ------------ field in this struct
12 | pub header: VolumeHeader,
| ^^^^^^
|
= note: `FirmwareMeta` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
Check warning on line 60 in clicky-core/src/executor/mod.rs
github-actions / clippy
struct `LocalExecutor` is never constructed
warning: struct `LocalExecutor` is never constructed
--> clicky-core/src/executor/mod.rs:60:16
|
60 | pub struct LocalExecutor(futures_executor::LocalPool);
| ^^^^^^^^^^^^^
Check warning on line 45 in clicky-core/src/executor/mod.rs
github-actions / clippy
struct `LocalSpawner` is never constructed
warning: struct `LocalSpawner` is never constructed
--> clicky-core/src/executor/mod.rs:45:16
|
45 | pub struct LocalSpawner(futures_executor::LocalSpawner);
| ^^^^^^^^^^^^
Check warning on line 16 in clicky-core/src/devices/generic/ide/smart.rs
github-actions / clippy
variants `ThroughputPerformance`, `ReadChannelMargin`, `SeekTimePerformance`, `RecalibrationRetries`, `SoftReadErrorRate`, and `ReallocationEventCount` are never constructed
warning: variants `ThroughputPerformance`, `ReadChannelMargin`, `SeekTimePerformance`, `RecalibrationRetries`, `SoftReadErrorRate`, and `ReallocationEventCount` are never constructed
--> clicky-core/src/devices/generic/ide/smart.rs:16:5
|
14 | pub enum AttributeId {
| ----------- variants in this enum
15 | ReadErrorRate = 0x01,
16 | ThroughputPerformance = 0x02,
| ^^^^^^^^^^^^^^^^^^^^^
...
20 | ReadChannelMargin = 0x06,
| ^^^^^^^^^^^^^^^^^
21 | SeekErrorRate = 0x07,
22 | SeekTimePerformance = 0x08,
| ^^^^^^^^^^^^^^^^^^^
...
25 | RecalibrationRetries = 0x0B,
| ^^^^^^^^^^^^^^^^^^^^
26 | PowerCycleCount = 0x0C,
27 | SoftReadErrorRate = 0x0D,
| ^^^^^^^^^^^^^^^^^
...
30 | ReallocationEventCount = 0xC4,
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `AttributeId` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
Check warning on line 199 in clicky-core/src/devices/generic/ide/mod.rs
github-actions / clippy
field `0` is never read
warning: field `0` is never read
--> clicky-core/src/devices/generic/ide/mod.rs:199:18
|
199 | DMAMultiWord(u8),
| ------------ ^^
| |
| field in this variant
|
= note: `IdeTransferMode` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
199 - DMAMultiWord(u8),
199 + DMAMultiWord(()),
|
Check warning on line 198 in clicky-core/src/devices/generic/ide/mod.rs
github-actions / clippy
field `0` is never read
warning: field `0` is never read
--> clicky-core/src/devices/generic/ide/mod.rs:198:19
|
198 | DMASingleWord(u8),
| ------------- ^^
| |
| field in this variant
|
= note: `IdeTransferMode` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
198 - DMASingleWord(u8),
198 + DMASingleWord(()),
|
Check warning on line 197 in clicky-core/src/devices/generic/ide/mod.rs
github-actions / clippy
field `0` is never read
warning: field `0` is never read
--> clicky-core/src/devices/generic/ide/mod.rs:197:20
|
197 | PioFlowControl(u8),
| -------------- ^^
| |
| field in this variant
|
= note: `IdeTransferMode` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
197 - PioFlowControl(u8),
197 + PioFlowControl(()),
|