Skip to content

devcon: Log reset/enable events #22

devcon: Log reset/enable events

devcon: Log reset/enable events #22

GitHub Actions / clippy succeeded May 30, 2024 in 0s

clippy

9 warnings

Details

Results

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

Versions

  • rustc 1.78.0 (9b00956e5 2024-04-29)
  • cargo 1.78.0 (54d8815d0 2024-03-26)
  • clippy 0.1.78 (9b00956 2024-04-29)

Annotations

Check warning on line 613 in clicky-core/src/devices/generic/ide/mod.rs

See this annotation in the file changed.

@github-actions 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:610:21
    |
610 | /                     if let Err(e) = self.blockdev.seek(io::SeekFrom::Start(offset * 512)).await {
611 | |                         // XXX: actually set error bits
612 | |                         return Err(e);
613 | |                     }
    | |_____________________^ 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/master/index.html#question_mark

Check warning on line 532 in clicky-core/src/devices/generic/ide/mod.rs

See this annotation in the file changed.

@github-actions 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:529:21
    |
529 | /                     if let Err(e) = self.blockdev.read_exact(self.iobuf.as_raw()).await {
530 | |                         // XXX: actually set error bits
531 | |                         return Err(e);
532 | |                     }
    | |_____________________^ 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/master/index.html#question_mark

Check warning on line 524 in clicky-core/src/devices/generic/ide/mod.rs

See this annotation in the file changed.

@github-actions 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:521:21
    |
521 | /                     if let Err(e) = self.blockdev.seek(io::SeekFrom::Start(offset * 512)).await {
522 | |                         // XXX: actually set error bits
523 | |                         return Err(e);
524 | |                     }
    | |_____________________^ 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/master/index.html#question_mark

Check warning on line 389 in clicky-core/src/devices/generic/ide/mod.rs

See this annotation in the file changed.

@github-actions 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:386:17
    |
386 | /                 if let Err(e) = self.blockdev.write_all(self.iobuf.as_raw()).await {
387 | |                     // XXX: actually set error bits
388 | |                     return Err(e);
389 | |                 }
    | |_________________^ 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/master/index.html#question_mark

Check warning on line 337 in clicky-core/src/devices/generic/ide/mod.rs

See this annotation in the file changed.

@github-actions 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:334:21
    |
334 | /                     if let Err(e) = self.blockdev.read_exact(self.iobuf.as_raw()).await {
335 | |                         // XXX: actually set error bits
336 | |                         return Err(e);
337 | |                     }
    | |_____________________^ 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/master/index.html#question_mark
    = note: `#[warn(clippy::question_mark)]` on by default

Check warning on line 289 in clicky-core/src/devices/generic/ide/mod.rs

See this annotation in the file changed.

@github-actions 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:289:13
    |
289 |             ((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/master/index.html#unnecessary_cast
    = note: `#[warn(clippy::unnecessary_cast)]` on by default

Check warning on line 167 in clicky-core/src/devices/generic/ide/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `0` is never read

warning: field `0` is never read
   --> clicky-core/src/devices/generic/ide/mod.rs:167:18
    |
167 |     DMAMultiWord(u8),
    |     ------------ ^^
    |     |
    |     field in this variant
    |
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
    |
167 |     DMAMultiWord(()),
    |                  ~~

Check warning on line 166 in clicky-core/src/devices/generic/ide/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `0` is never read

warning: field `0` is never read
   --> clicky-core/src/devices/generic/ide/mod.rs:166:19
    |
166 |     DMASingleWord(u8),
    |     ------------- ^^
    |     |
    |     field in this variant
    |
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
    |
166 |     DMASingleWord(()),
    |                   ~~

Check warning on line 165 in clicky-core/src/devices/generic/ide/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `0` is never read

warning: field `0` is never read
   --> clicky-core/src/devices/generic/ide/mod.rs:165:20
    |
165 |     PioFlowControl(u8),
    |     -------------- ^^
    |     |
    |     field in this variant
    |
    = note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
    |
165 |     PioFlowControl(()),
    |                    ~~