Update message size test #288
clippy
87 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 87 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.77.2 (25ef9e3d8 2024-04-09)
- cargo 1.77.2 (e52e36006 2024-03-26)
- clippy 0.1.77 (25ef9e3 2024-04-09)
Annotations
Check warning on line 64 in boards/sensor_v2/src/main.rs
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
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
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
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
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
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
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
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
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
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 136 in boards/recovery/src/main.rs
github-actions / clippy
empty `loop {}` wastes CPU cycles
warning: empty `loop {}` wastes CPU cycles
--> boards/recovery/src/main.rs:136:9
|
136 | 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 106 in boards/recovery/src/state_machine/mod.rs
github-actions / clippy
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> boards/recovery/src/state_machine/mod.rs:106:1
|
106 | impl Into<state::StateData> for RocketStates {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implementation with `From<state_machine::RocketStates>`
|
106 ~ impl From<RocketStates> for state::StateData {
107 ~ fn from(val: RocketStates) -> Self {
108 ~ match val {
|
Check warning on line 71 in boards/recovery/src/communication.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> boards/recovery/src/communication.rs:62:5
|
62 | / pub fn new<S>(
63 | | can_rx: Pin<PA23, AlternateI>,
64 | | can_tx: Pin<PA22, AlternateI>,
65 | | pclk_can: Pclk<Can0, Gclk0Id>,
... |
70 | | loopback: bool,
71 | | ) -> (Self, S::Inc)
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
Check warning on line 57 in boards/recovery/src/communication.rs
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/recovery/src/communication.rs:52:14
|
52 | pub can: Can<
| ______________^
53 | | 'static,
54 | | Can0,
55 | | Dependencies<Can0, Gclk0Id, Pin<PA23, Alternate<I>>, Pin<PA22, Alternate<I>>, CAN0>,
56 | | Capacities,
57 | | >,
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
Check warning on line 72 in boards/recovery/src/state_machine/mod.rs
github-actions / clippy
variants `DeployDrogue` and `DeployMain` are never constructed
warning: variants `DeployDrogue` and `DeployMain` are never constructed
--> boards/recovery/src/state_machine/mod.rs:72:5
|
71 | pub enum RocketEvents {
| ------------ variants in this enum
72 | DeployDrogue,
| ^^^^^^^^^^^^
73 | DeployMain,
| ^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 127 in boards/camera/src/main.rs
github-actions / clippy
empty `loop {}` wastes CPU cycles
warning: empty `loop {}` wastes CPU cycles
--> boards/camera/src/main.rs:127:9
|
127 | 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 111 in boards/camera/src/state_machine/mod.rs
github-actions / clippy
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> boards/camera/src/state_machine/mod.rs:111:1
|
111 | impl Into<state::StateData> for RocketStates {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implementation with `From<state_machine::RocketStates>`
|
111 ~ impl From<RocketStates> for state::StateData {
112 ~ fn from(val: RocketStates) -> Self {
113 ~ match val {
|
Check warning on line 120 in boards/camera/src/data_manager.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`
--> boards/camera/src/data_manager.rs:115:47
|
115 | messages::Data::Sensor(sensor) => match sensor.data {
| _______________________________________________^
116 | | messages::sensor::SensorData::Air(air_data) => {
117 | | self.air = Some(air_data);
118 | | }
119 | | _ => {}
120 | | },
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
help: try
|
115 ~ messages::Data::Sensor(sensor) => if let messages::sensor::SensorData::Air(air_data) = sensor.data {
116 + self.air = Some(air_data);
117 ~ },
|
Check warning on line 122 in boards/camera/src/data_manager.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`
--> boards/camera/src/data_manager.rs:114:9
|
114 | / match data.data {
115 | | messages::Data::Sensor(sensor) => match sensor.data {
116 | | messages::sensor::SensorData::Air(air_data) => {
117 | | self.air = Some(air_data);
... |
121 | | _ => {}
122 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try
|
114 ~ if let messages::Data::Sensor(sensor) = data.data { match sensor.data {
115 + messages::sensor::SensorData::Air(air_data) => {
116 + self.air = Some(air_data);
117 + }
118 + _ => {}
119 + } }
|
Check warning on line 67 in boards/camera/src/communication.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> boards/camera/src/communication.rs:58:5
|
58 | / pub fn new<S>(
59 | | can_rx: Pin<PA23, AlternateI>,
60 | | can_tx: Pin<PA22, AlternateI>,
61 | | pclk_can: Pclk<Can0, Gclk0Id>,
... |
66 | | loopback: bool,
67 | | ) -> (Self, S::Inc)
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
Check warning on line 53 in boards/camera/src/communication.rs
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/camera/src/communication.rs:48:14
|
48 | pub can: Can<
| ______________^
49 | | 'static,
50 | | Can0,
51 | | Dependencies<Can0, Gclk0Id, Pin<PA23, Alternate<I>>, Pin<PA22, Alternate<I>>, CAN0>,
52 | | Capacities,
53 | | >,
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
Check warning on line 77 in boards/camera/src/state_machine/mod.rs
github-actions / clippy
variants `DeployDrogue` and `DeployMain` are never constructed
warning: variants `DeployDrogue` and `DeployMain` are never constructed
--> boards/camera/src/state_machine/mod.rs:77:5
|
76 | pub enum RocketEvents {
| ------------ variants in this enum
77 | DeployDrogue,
| ^^^^^^^^^^^^
78 | DeployMain,
| ^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 113 in boards/power/src/main.rs
github-actions / clippy
empty `loop {}` wastes CPU cycles
warning: empty `loop {}` wastes CPU cycles
--> boards/power/src/main.rs:113:9
|
113 | 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 69 in boards/power/src/communication.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> boards/power/src/communication.rs:60:5
|
60 | / pub fn new<S>(
61 | | can_rx: Pin<PA23, AlternateI>,
62 | | can_tx: Pin<PA22, AlternateI>,
63 | | pclk_can: Pclk<Can0, Gclk0Id>,
... |
68 | | loopback: bool,
69 | | ) -> (Self, S::Inc)
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
Check warning on line 55 in boards/power/src/communication.rs
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/power/src/communication.rs:50:14
|
50 | pub can: Can<
| ______________^
51 | | 'static,
52 | | Can0,
53 | | Dependencies<Can0, Gclk0Id, Pin<PA23, Alternate<I>>, Pin<PA22, Alternate<I>>, CAN0>,
54 | | Capacities,
55 | | >,
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default