Skip to content

added stubs

added stubs #72

GitHub Actions / clippy failed Oct 30, 2023 in 0s

clippy

12 errors

Details

Results

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

Versions

  • rustc 1.73.0 (cc66ad468 2023-10-03)
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (cc66ad4 2023-10-03)

Annotations

Check failure on line 9 in src/utils/ring_buf.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods `write` and `read` are never used

error: methods `write` and `read` are never used
  --> src/utils/ring_buf.rs:9:12
   |
8  | impl<const C: usize> RingBuffer<C> {
   | ---------------------------------- methods in this implementation
9  |     pub fn write(&mut self, data: &[u8]) {
   |            ^^^^^
...
35 |     pub fn read(&mut self) -> Vec<u8> {
   |            ^^^^

Check failure on line 3 in src/utils/ring_buf.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

fields `buf`, `idx`, and `len` are never read

error: fields `buf`, `idx`, and `len` are never read
 --> src/utils/ring_buf.rs:3:5
  |
2 | pub struct RingBuffer<const C: usize> {
  |            ---------- fields in this struct
3 |     buf: Vec<u8>,
  |     ^^^
4 |     idx: usize,
  |     ^^^
5 |     len: usize,
  |     ^^^
  |
  = note: `RingBuffer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

Check failure on line 36 in src/hal/stub/serial.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variants `NotStarted`, `AlreadyRunning`, and `InternalError` are never constructed

error: variants `NotStarted`, `AlreadyRunning`, and `InternalError` are never constructed
  --> src/hal/stub/serial.rs:36:5
   |
35 | pub enum SerialError {
   |          ----------- variants in this enum
36 |     NotStarted,
   |     ^^^^^^^^^^
37 |     AlreadyRunning,
   |     ^^^^^^^^^^^^^^
38 |     InternalError(String),
   |     ^^^^^^^^^^^^^
   |
   = note: `SerialError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

Check failure on line 82 in src/hal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `to_inverse_bitfield` is never used

error: method `to_inverse_bitfield` is never used
  --> src/hal.rs:82:12
   |
77 | impl NodeId {
   | ----------- method in this implementation
...
82 |     pub fn to_inverse_bitfield(self) -> u8 {
   |            ^^^^^^^^^^^^^^^^^^^

Check failure on line 82 in src/firmware_update.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variants `NoMsdDevices` and `NoDriver` are never constructed

error: variants `NoMsdDevices` and `NoDriver` are never constructed
  --> src/firmware_update.rs:82:5
   |
78 | pub enum FwUpdateError {
   |          ------------- variants in this enum
...
82 |     NoMsdDevices,
   |     ^^^^^^^^^^^^
...
94 |     NoDriver(rusb::Device<GlobalContext>),
   |     ^^^^^^^^
   |
   = note: `FwUpdateError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
   = note: `-D dead-code` implied by `-D warnings`

Check failure on line 20 in src/hal/stub/usbboot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `filter`

error: unused variable: `filter`
  --> src/hal/stub/usbboot.rs:20:5
   |
20 |     filter: I,
   |     ^^^^^^ help: if this is intentional, prefix it with an underscore: `_filter`

Check failure on line 63 in src/firmware_update.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `device`

error: unused variable: `device`
  --> src/firmware_update.rs:63:5
   |
63 |     device: &rusb::Device<GlobalContext>,
   |     ^^^^^^ help: if this is intentional, prefix it with an underscore: `_device`

Check failure on line 39 in src/hal/stub/usbboot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `allowed_vendors`

error: unused variable: `allowed_vendors`
  --> src/hal/stub/usbboot.rs:39:5
   |
39 |     allowed_vendors: I,
   |     ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_allowed_vendors`

Check failure on line 42 in src/hal/stub/power_controller.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `on`

error: unused variable: `on`
  --> src/hal/stub/power_controller.rs:42:35
   |
42 |     pub async fn power_led(&self, on: bool) -> std::io::Result<()> {
   |                                   ^^ help: if this is intentional, prefix it with an underscore: `_on`
   |
   = note: `-D unused-variables` implied by `-D warnings`

Check failure on line 17 in src/hal/stub/usbboot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `time::Duration`

error: unused import: `time::Duration`
  --> src/hal/stub/usbboot.rs:17:26
   |
17 | use std::{path::PathBuf, time::Duration};
   |                          ^^^^^^^^^^^^^^

Check failure on line 16 in src/hal/stub/usbboot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `UsbContext`

error: unused import: `UsbContext`
  --> src/hal/stub/usbboot.rs:16:35
   |
16 | use rusb::{Device, GlobalContext, UsbContext};
   |                                   ^^^^^^^^^^

Check failure on line 15 in src/hal/stub/usbboot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `Context`

error: unused import: `Context`
  --> src/hal/stub/usbboot.rs:15:14
   |
15 | use anyhow::{Context, Result};
   |              ^^^^^^^
   |
   = note: `-D unused-imports` implied by `-D warnings`