feature(async): ppp support using embassy-net-ppp & embassy-at-cmux #131
clippy
28 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 28 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.75.0 (82e1608df 2023-12-21)
- cargo 1.75.0 (1d8b05cdd 2023-11-20)
- clippy 0.1.75 (82e1608 2023-12-21)
Annotations
Check warning on line 492 in src/asynch/runner.rs
github-actions / clippy
unused `core::result::Result` that must be used
warning: unused `core::result::Result` that must be used
--> src/asynch/runner.rs:492:21
|
492 | self.handle_urc(event).await;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this `Result` may be an `Err` variant, which should be handled
= note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
|
492 | let _ = self.handle_urc(event).await;
| +++++++
Check warning on line 343 in src/asynch/state.rs
github-actions / clippy
redundant closure
warning: redundant closure
--> src/asynch/state.rs:343:22
|
343 | .map_err(|x| Error::SubscriberOverflow(x))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Error::SubscriberOverflow`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
Check warning on line 247 in src/asynch/state.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'd
warning: the following explicit lifetimes could be elided: 'd
--> src/asynch/state.rs:247:16
|
247 | pub fn new_ppp<'d>(state: &'d mut State) -> Runner<'d> {
| ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
247 - pub fn new_ppp<'d>(state: &'d mut State) -> Runner<'d> {
247 + pub fn new_ppp(state: &mut State) -> Runner<'_> {
|
Check warning on line 221 in src/asynch/state.rs
github-actions / clippy
redundant closure
warning: redundant closure
--> src/asynch/state.rs:221:22
|
221 | .map_err(|x| Error::SubscriberOverflow(x))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Error::SubscriberOverflow`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
Check warning on line 208 in src/asynch/state.rs
github-actions / clippy
redundant closure
warning: redundant closure
--> src/asynch/state.rs:208:22
|
208 | .map_err(|x| Error::SubscriberOverflow(x))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Error::SubscriberOverflow`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
Check warning on line 891 in src/asynch/runner.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/asynch/runner.rs:891:9
|
891 | return Err(Error::ContextActivationTimeout);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
891 - return Err(Error::ContextActivationTimeout);
891 + Err(Error::ContextActivationTimeout)
|
Check warning on line 670 in src/asynch/runner.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> src/asynch/runner.rs:670:9
|
670 | return Ok(false);
| ^^^^^^^^^^^^^^^^
|
= 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`
|
670 - return Ok(false);
670 + Ok(false)
|
Check warning on line 339 in src/asynch/runner.rs
github-actions / clippy
redundant guard
warning: redundant guard
--> src/asynch/runner.rs:339:43
|
339 | Ok(PinStatus { code }) if code == PinStatusCode::Ready => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
339 - Ok(PinStatus { code }) if code == PinStatusCode::Ready => {
339 + Ok(PinStatus { code: PinStatusCode::Ready }) => {
|
Check warning on line 59 in src/asynch/control.rs
github-actions / clippy
redundant closure
warning: redundant closure
--> src/asynch/control.rs:59:22
|
59 | .map_err(|e| Error::Atat(e))
| ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Error::Atat`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
Check warning on line 50 in src/asynch/control.rs
github-actions / clippy
redundant closure
warning: redundant closure
--> src/asynch/control.rs:50:22
|
50 | .map_err(|e| Error::Atat(e))
| ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Error::Atat`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
Check warning on line 22 in src/asynch/control.rs
github-actions / clippy
method `init` is never used
warning: method `init` is never used
--> src/asynch/control.rs:22:25
|
17 | impl<'a, AT: AtatClient> Control<'a, AT> {
| ---------------------------------------- method in this implementation
...
22 | pub(crate) async fn init(&mut self) -> Result<(), Error> {
| ^^^^
Check warning on line 56 in src/module_timing.rs
github-actions / clippy
function `kill_time` is never used
warning: function `kill_time` is never used
--> src/module_timing.rs:56:8
|
56 | pub fn kill_time() -> Option<Duration> {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 25 in src/asynch/runner.rs
github-actions / clippy
unused import: `crate::command::system_features::SetPowerSavingControl`
warning: unused import: `crate::command::system_features::SetPowerSavingControl`
--> src/asynch/runner.rs:25:5
|
25 | use crate::command::system_features::SetPowerSavingControl;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 24 in src/asynch/runner.rs
github-actions / clippy
unused import: `crate::command::system_features::types::PowerSavingMode`
warning: unused import: `crate::command::system_features::types::PowerSavingMode`
--> src/asynch/runner.rs:24:5
|
24 | use crate::command::system_features::types::PowerSavingMode;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 20 in src/asynch/runner.rs
github-actions / clippy
unused import: `SetReportMobileTerminationError`
warning: unused import: `SetReportMobileTerminationError`
--> src/asynch/runner.rs:20:62
|
20 | use crate::command::mobile_control::{SetModuleFunctionality, SetReportMobileTerminationError};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 19 in src/asynch/runner.rs
github-actions / clippy
unused import: `TerminationErrorMode`
warning: unused import: `TerminationErrorMode`
--> src/asynch/runner.rs:19:71
|
19 | use crate::command::mobile_control::types::{Functionality, ResetMode, TerminationErrorMode};
| ^^^^^^^^^^^^^^^^^^^^
Check warning on line 18 in src/asynch/runner.rs
github-actions / clippy
unused import: `crate::command::ip_transport_layer::SetHexMode`
warning: unused import: `crate::command::ip_transport_layer::SetHexMode`
--> src/asynch/runner.rs:18:5
|
18 | use crate::command::ip_transport_layer::SetHexMode;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 17 in src/asynch/runner.rs
github-actions / clippy
unused import: `crate::command::ip_transport_layer::types::HexMode`
warning: unused import: `crate::command::ip_transport_layer::types::HexMode`
--> src/asynch/runner.rs:17:5
|
17 | use crate::command::ip_transport_layer::types::HexMode;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 16 in src/asynch/runner.rs
github-actions / clippy
unused import: `crate::command::gpio::SetGpioConfiguration`
warning: unused import: `crate::command::gpio::SetGpioConfiguration`
--> src/asynch/runner.rs:16:5
|
16 | use crate::command::gpio::SetGpioConfiguration;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 14 in src/asynch/runner.rs
github-actions / clippy
unused imports: `GetCCID`, `GetFirmwareVersion`, `GetModelId`
warning: unused imports: `GetCCID`, `GetFirmwareVersion`, `GetModelId`
--> src/asynch/runner.rs:14:31
|
14 | use crate::command::general::{GetCCID, GetFirmwareVersion, GetModelId};
| ^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^
Check warning on line 10 in src/asynch/runner.rs
github-actions / clippy
unused imports: `SetCircuit108Behaviour`, `SetCircuit109Behaviour`, `SetFlowControl`
warning: unused imports: `SetCircuit108Behaviour`, `SetCircuit109Behaviour`, `SetFlowControl`
--> src/asynch/runner.rs:10:31
|
10 | use crate::command::control::{SetCircuit108Behaviour, SetCircuit109Behaviour, SetFlowControl};
| ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
Check warning on line 9 in src/asynch/runner.rs
github-actions / clippy
unused imports: `Circuit108Behaviour`, `Circuit109Behaviour`, `FlowControl`
warning: unused imports: `Circuit108Behaviour`, `Circuit109Behaviour`, `FlowControl`
--> src/asynch/runner.rs:9:38
|
9 | use crate::command::control::types::{Circuit108Behaviour, Circuit109Behaviour, FlowControl};
| ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
Check warning on line 5 in src/asynch/control.rs
github-actions / clippy
unused imports: `Duration`, `with_timeout`
warning: unused imports: `Duration`, `with_timeout`
--> src/asynch/control.rs:5:20
|
5 | use embassy_time::{with_timeout, Duration};
| ^^^^^^^^^^^^ ^^^^^^^^
Check warning on line 2 in src/asynch/control.rs
github-actions / clippy
unused import: `core::task::Poll`
warning: unused import: `core::task::Poll`
--> src/asynch/control.rs:2:5
|
2 | use core::task::Poll;
| ^^^^^^^^^^^^^^^^
Check warning on line 1 in src/asynch/control.rs
github-actions / clippy
unused import: `core::future::poll_fn`
warning: unused import: `core::future::poll_fn`
--> src/asynch/control.rs:1:5
|
1 | use core::future::poll_fn;
| ^^^^^^^^^^^^^^^^^^^^^