Skip to content

enhancement(example): rp2040 + lara-r6 example #130

enhancement(example): rp2040 + lara-r6 example

enhancement(example): rp2040 + lara-r6 example #130

GitHub Actions / clippy succeeded Feb 15, 2024 in 0s

clippy

41 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 41
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 511 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `core::result::Result` that must be used

warning: unused `core::result::Result` that must be used
   --> src/asynch/runner.rs:511:21
    |
511 |                     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
    |
511 |                     let _ = self.handle_urc(event).await;
    |                     +++++++

Check warning on line 335 in src/asynch/state.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

warning: redundant closure
   --> src/asynch/state.rs:335:22
    |
335 |             .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 222 in src/asynch/state.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

warning: redundant closure
   --> src/asynch/state.rs:222:22
    |
222 |             .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 209 in src/asynch/state.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

warning: redundant closure
   --> src/asynch/state.rs:209:22
    |
209 |             .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 910 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> src/asynch/runner.rs:910:9
    |
910 |         return Err(Error::ContextActivationTimeout);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
910 -         return Err(Error::ContextActivationTimeout);
910 +         Err(Error::ContextActivationTimeout)
    |

Check warning on line 689 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> src/asynch/runner.rs:689:9
    |
689 |         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`
    |
689 -         return Ok(false);
689 +         Ok(false)
    |

Check warning on line 358 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant guard

warning: redundant guard
   --> src/asynch/runner.rs:358:43
    |
358 |                 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
    |
358 -                 Ok(PinStatus { code }) if code == PinStatusCode::Ready => {
358 +                 Ok(PinStatus { code: PinStatusCode::Ready }) => {
    |

Check warning on line 109 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> src/asynch/runner.rs:102:9
    |
102 | /         let alive = match self.at.send(&AT).await {
103 | |             Ok(_) => {
104 | |                 return Ok(true);
105 | |             }
...   |
108 | |             }
109 | |         };
    | |__________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
    = note: `#[warn(clippy::let_unit_value)]` on by default
help: omit the `let` binding
    |
102 ~         match self.at.send(&AT).await {
103 +             Ok(_) => {
104 +                 return Ok(true);
105 +             }
106 +             Err(err) => {
107 +                 return Err(Error::Atat(err));
108 +             }
109 +         };
    |

Check warning on line 59 in src/asynch/control.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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 821 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `profile_id`

warning: unused variable: `profile_id`
   --> src/asynch/runner.rs:821:9
    |
821 |         profile_id: ProfileId,
    |         ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_profile_id`

Check warning on line 190 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `model_id`

warning: unused variable: `model_id`
   --> src/asynch/runner.rs:190:13
    |
190 |         let model_id = self.at.send(&GetModelId).await?;
    |             ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_model_id`

Check warning on line 102 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `alive`

warning: unused variable: `alive`
   --> src/asynch/runner.rs:102:13
    |
102 |         let alive = match self.at.send(&AT).await {
    |             ^^^^^ help: if this is intentional, prefix it with an underscore: `_alive`
    |
    = note: `#[warn(unused_variables)]` on by default

Check warning on line 64 in src/asynch/mod.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
  --> src/asynch/mod.rs:64:9
   |
64 |     let mut control = Control::new(state_ch, AtHandle(&state.at_handle));
   |         ----^^^^^^^
   |         |
   |         help: remove this `mut`

Check warning on line 54 in src/asynch/mod.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
  --> src/asynch/mod.rs:54:9
   |
54 |     let mut runner = Runner::new(
   |         ----^^^^^^
   |         |
   |         help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

Check warning on line 7 in src/asynch/state.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `crate::asynch::state::OperationState::DataEstablished`

warning: unused import: `crate::asynch::state::OperationState::DataEstablished`
 --> src/asynch/state.rs:7:5
  |
7 | use crate::asynch::state::OperationState::DataEstablished;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 49 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `crate::error::Error::Network`

warning: unused import: `crate::error::Error::Network`
  --> src/asynch/runner.rs:49:5
   |
49 | use crate::error::Error::Network;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 45 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused imports: `Ipv4Addr`, `Ipv6Addr`

warning: unused imports: `Ipv4Addr`, `Ipv6Addr`
  --> src/asynch/runner.rs:45:18
   |
45 | use no_std_net::{Ipv4Addr, Ipv6Addr};
   |                  ^^^^^^^^  ^^^^^^^^

Check warning on line 44 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `heapless::String`

warning: unused import: `heapless::String`
  --> src/asynch/runner.rs:44:5
   |
44 | use heapless::String;
   |     ^^^^^^^^^^^^^^^^

Check warning on line 38 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `crate::error::GenericError::Timeout`

warning: unused import: `crate::error::GenericError::Timeout`
  --> src/asynch/runner.rs:38:5
   |
38 | use crate::error::GenericError::Timeout;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 33 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `crate::command::psn::SetPacketSwitchedAction`

warning: unused import: `crate::command::psn::SetPacketSwitchedAction`
  --> src/asynch/runner.rs:33:5
   |
33 | use crate::command::psn::SetPacketSwitchedAction;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 32 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `crate::command::psn::types::PacketSwitchedNetworkDataParam`

warning: unused import: `crate::command::psn::types::PacketSwitchedNetworkDataParam`
  --> src/asynch/runner.rs:32:5
   |
32 | use crate::command::psn::types::PacketSwitchedNetworkDataParam;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 31 in src/asynch/runner.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `crate::command::psn::types::PacketSwitchedAction`

warning: unused import: `crate::command::psn::types::PacketSwitchedAction`
  --> src/asynch/runner.rs:31:5
   |
31 | use crate::command::psn::types::PacketSwitchedAction;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^