Skip to content

create recovery timer mechanism #259

create recovery timer mechanism

create recovery timer mechanism #259

GitHub Actions / clippy succeeded May 11, 2024 in 1s

clippy

90 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 90
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 64 in boards/sensor_v2/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty `loop {}` wastes CPU cycles

warning: empty `loop {}` wastes CPU cycles
  --> boards/sensor_v2/src/main.rs:64:9
   |
64 |         loop {}
   |         ^^^^^^^
   |
   = help: you should either use `panic!()` or add a call pausing or sleeping the thread to the loop body
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_loop
   = note: `#[warn(clippy::empty_loop)]` on by default

Check warning on line 26 in boards/sensor_v2/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `data_manager` is never read

warning: field `data_manager` is never read
  --> boards/sensor_v2/src/main.rs:26:9
   |
26 |         data_manager: DataManager,
   |         ^^^^^^^^^^^^
...
35 |     fn init(mut ctx: init::Context) -> (SharedResources, LocalResources, init::Monotonics) {
   |                                         --------------- field in this struct

Check warning on line 32 in boards/sensor_v2/src/data_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods `clone_sensors` and `handle_data` are never used

warning: methods `clone_sensors` and `handle_data` are never used
  --> boards/sensor_v2/src/data_manager.rs:32:12
   |
19 | impl DataManager {
   | ---------------- methods in this implementation
...
32 |     pub fn clone_sensors(&self) -> [Option<SensorData>; 10] {
   |            ^^^^^^^^^^^^^
...
47 |     pub fn handle_data(&mut self, data: Message) -> Result<(), HydraError> {
   |            ^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 68 in boards/sensor_v2/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
  --> boards/sensor_v2/src/main.rs:68:21
   |
68 |     fn sleep_system(mut cx: sleep_system::Context) {
   |                     ----^^
   |                     |
   |                     help: remove this `mut`

Check warning on line 68 in boards/sensor_v2/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `cx`

warning: unused variable: `cx`
  --> boards/sensor_v2/src/main.rs:68:25
   |
68 |     fn sleep_system(mut cx: sleep_system::Context) {
   |                         ^^ help: if this is intentional, prefix it with an underscore: `_cx`

Check warning on line 63 in boards/sensor_v2/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
  --> boards/sensor_v2/src/main.rs:63:13
   |
63 |     fn idle(mut ctx: idle::Context) -> ! {
   |             ----^^^
   |             |
   |             help: remove this `mut`

Check warning on line 63 in boards/sensor_v2/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `ctx`

warning: unused variable: `ctx`
  --> boards/sensor_v2/src/main.rs:63:17
   |
63 |     fn idle(mut ctx: idle::Context) -> ! {
   |                 ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`

Check warning on line 49 in boards/sensor_v2/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
  --> boards/sensor_v2/src/main.rs:49:13
   |
49 |         let mut button = gpioc.pc13.into_floating_input();
   |             ----^^^^^^
   |             |
   |             help: remove this `mut`

Check warning on line 35 in boards/sensor_v2/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
  --> boards/sensor_v2/src/main.rs:35:13
   |
35 |     fn init(mut ctx: init::Context) -> (SharedResources, LocalResources, init::Monotonics) {
   |             ----^^^
   |             |
   |             help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

Check warning on line 16 in boards/sensor_v2/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `info`

warning: unused variable: `info`
  --> boards/sensor_v2/src/main.rs:16:10
   |
16 | fn panic(info: &core::panic::PanicInfo) -> ! {
   |          ^^^^ help: if this is intentional, prefix it with an underscore: `_info`
   |
   = note: `#[warn(unused_variables)]` on by default

Check warning on line 89 in boards/beacon/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty `loop {}` wastes CPU cycles

warning: empty `loop {}` wastes CPU cycles
  --> boards/beacon/src/main.rs:89:9
   |
89 |         loop {}
   |         ^^^^^^^
   |
   = help: you should either use `panic!()` or add a call pausing or sleeping the thread to the loop body
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_loop
   = note: `#[warn(clippy::empty_loop)]` on by default

Check warning on line 52 in boards/beacon/src/data_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
  --> boards/beacon/src/data_manager.rs:52:9
   |
52 |         return RadioRate::Slow;
   |         ^^^^^^^^^^^^^^^^^^^^^^
   |
   = 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`
   |
52 -         return RadioRate::Slow;
52 +         RadioRate::Slow
   |

Check warning on line 42 in boards/beacon/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `data_manager` is never read

warning: field `data_manager` is never read
  --> boards/beacon/src/main.rs:42:9
   |
42 |         data_manager: DataManager,
   |         ^^^^^^^^^^^^
...
56 |     fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
   |                                    ------ field in this struct

Check warning on line 7 in boards/beacon/src/types.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

static `COM_ID` is never used

warning: static `COM_ID` is never used
 --> boards/beacon/src/types.rs:7:12
  |
7 | pub static COM_ID: Node = BeaconBoard;
  |            ^^^^^^

Check warning on line 45 in boards/beacon/src/data_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods `get_logging_rate`, `take_sensors`, `clone_states`, and `handle_data` are never used

warning: methods `get_logging_rate`, `take_sensors`, `clone_states`, and `handle_data` are never used
  --> boards/beacon/src/data_manager.rs:45:12
   |
24 | impl DataManager {
   | ---------------- methods in this implementation
...
45 |     pub fn get_logging_rate(&mut self) -> RadioRate {
   |            ^^^^^^^^^^^^^^^^
...
56 |     pub fn take_sensors(&mut self) -> [Option<Message>; 13] {
   |            ^^^^^^^^^^^^
...
74 |     pub fn clone_states(&self) -> [Option<StateData>; 1] {
   |            ^^^^^^^^^^^^
...
77 |     pub fn handle_data(&mut self, data: Message) {
   |            ^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 101 in boards/beacon/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `m`

warning: unused variable: `m`
   --> boards/beacon/src/main.rs:101:50
    |
101 |     fn send_external(cx: send_external::Context, m: Message) {
    |                                                  ^ help: if this is intentional, prefix it with an underscore: `_m`

Check warning on line 101 in boards/beacon/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `cx`

warning: unused variable: `cx`
   --> boards/beacon/src/main.rs:101:22
    |
101 |     fn send_external(cx: send_external::Context, m: Message) {
    |                      ^^ help: if this is intentional, prefix it with an underscore: `_cx`

Check warning on line 96 in boards/beacon/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `m`

warning: unused variable: `m`
  --> boards/beacon/src/main.rs:96:50
   |
96 |     fn send_internal(cx: send_internal::Context, m: Message) {
   |                                                  ^ help: if this is intentional, prefix it with an underscore: `_m`

Check warning on line 96 in boards/beacon/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `cx`

warning: unused variable: `cx`
  --> boards/beacon/src/main.rs:96:22
   |
96 |     fn send_internal(cx: send_internal::Context, m: Message) {
   |                      ^^ help: if this is intentional, prefix it with an underscore: `_cx`
   |
   = note: `#[warn(unused_variables)]` on by default

Check warning on line 66 in boards/beacon/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
  --> boards/beacon/src/main.rs:66:13
   |
66 |         let mut red_led = gpioa.pa10.into_push_pull_output();
   |             ----^^^^^^^
   |             |
   |             help: remove this `mut`

Check warning on line 65 in boards/beacon/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variable does not need to be mutable

warning: variable does not need to be mutable
  --> boards/beacon/src/main.rs:65:13
   |
65 |         let mut green_led = gpioa.pa9.into_push_pull_output();
   |             ----^^^^^^^^^
   |             |
   |             help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

Check warning on line 12 in boards/beacon/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `messages::sensor::Sensor`

warning: unused import: `messages::sensor::Sensor`
  --> boards/beacon/src/main.rs:12:5
   |
12 | use messages::sensor::Sensor;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 8 in boards/beacon/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `common_arm::SdManager`

warning: unused import: `common_arm::SdManager`
 --> boards/beacon/src/main.rs:8:5
  |
8 | use common_arm::SdManager;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Check warning on line 74 in boards/communication/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
  --> boards/communication/src/main.rs:60:21
   |
60 |           sd_manager: SdManager<
   |  _____________________^
61 | |             Spi<
62 | |                 Config<
63 | |                     Pads<
...  |
73 | |             Pin<PB14, Output<PushPull>>,
74 | |         >,
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity

Check warning on line 253 in boards/communication/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> boards/communication/src/main.rs:253:42
    |
253 |                 manager.write(&mut file, &msg_ser)?;
    |                                          ^^^^^^^^ help: change this to: `msg_ser`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow