Skip to content

feature(*): Full async implementation #39

feature(*): Full async implementation

feature(*): Full async implementation #39

GitHub Actions / clippy failed Jul 18, 2024 in 1s

clippy

8 errors, 7 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 8
Warning 7
Note 0
Help 0

Versions

  • rustc 1.79.0 (129f3b996 2024-06-10)
  • cargo 1.79.0 (ffa9cf99a 2024-06-03)
  • clippy 0.1.79 (129f3b9 2024-06-10)

Annotations

Check warning on line 63 in src/command/wifi/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `e`

warning: unused variable: `e`
  --> src/command/wifi/mod.rs:63:73
   |
63 |                 atat::serde_at::from_slice::<NoResponse>(resp).map_err(|e| atat::Error::Parse)
   |                                                                         ^ help: if this is intentional, prefix it with an underscore: `_e`

Check failure on line 37 in src/command/wifi/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

not all trait items implemented, missing: `MAX_LEN`, `write`

error[E0046]: not all trait items implemented, missing: `MAX_LEN`, `write`
  --> src/command/wifi/mod.rs:37:1
   |
37 | impl<'a> atat::AtatCmd<{ ATAT_SETWIFISTATIONCONFIG_LEN + 12usize }> for SetWifiStationConfig<'a> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MAX_LEN`, `write` in implementation
   |
   = help: implement the missing item: `const MAX_LEN: usize = 42;`
   = help: implement the missing item: `fn write(&self, _: &mut [u8]) -> usize { todo!() }`

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

See this annotation in the file changed.

@github-actions github-actions / clippy

unreachable call

warning: unreachable call
   --> src/asynch/control.rs:523:39
    |
523 |                         config_param: WifiStationConfig::WpaPskOrPassphrase(todo!("hex values?!")),
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ --------------------- any code following this expression is unreachable
    |                                       |
    |                                       unreachable call
    |
    = note: `#[warn(unreachable_code)]` on by default

Check failure on line 507 in src/asynch/control.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`?` operator has incompatible types

error[E0308]: `?` operator has incompatible types
   --> src/asynch/control.rs:507:29
    |
507 | ...                   heapless::String::try_from(passphrase).map_err(|_| Error::Overflow)?,
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `String<_>`
    |
    = note: `?` operator cannot convert from `heapless::String<_>` to `&str`
    = note: expected reference `&str`
                  found struct `heapless::String<_>`
help: consider borrowing here
    |
507 |                             &heapless::String::try_from(passphrase).map_err(|_| Error::Overflow)?,
    |                             +

Check failure on line 481 in src/asynch/control.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`?` operator has incompatible types

error[E0308]: `?` operator has incompatible types
   --> src/asynch/control.rs:481:21
    |
481 |                     heapless::String::try_from(ssid).map_err(|_| Error::Overflow)?,
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `String<_>`
    |
    = note: `?` operator cannot convert from `heapless::String<_>` to `&str`
    = note: expected reference `&str`
                  found struct `heapless::String<_>`
help: consider borrowing here
    |
481 |                     &heapless::String::try_from(ssid).map_err(|_| Error::Overflow)?,
    |                     +

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

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `channel`

warning: unused variable: `channel`
   --> src/asynch/control.rs:440:73
    |
440 |     pub async fn start_ap_wpa2(&mut self, ssid: &str, passphrase: &str, channel: u8) {
    |                                                                         ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_channel`

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

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `passphrase`

warning: unused variable: `passphrase`
   --> src/asynch/control.rs:440:55
    |
440 |     pub async fn start_ap_wpa2(&mut self, ssid: &str, passphrase: &str, channel: u8) {
    |                                                       ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_passphrase`

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

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `ssid`

warning: unused variable: `ssid`
   --> src/asynch/control.rs:440:43
    |
440 |     pub async fn start_ap_wpa2(&mut self, ssid: &str, passphrase: &str, channel: u8) {
    |                                           ^^^^ help: if this is intentional, prefix it with an underscore: `_ssid`

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

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `ssid`

warning: unused variable: `ssid`
   --> src/asynch/control.rs:435:43
    |
435 |     pub async fn start_ap_open(&mut self, ssid: &str, channel: u8) {
    |                                           ^^^^ help: if this is intentional, prefix it with an underscore: `_ssid`
    |
    = note: `#[warn(unused_variables)]` on by default

Check failure on line 37 in src/command/wifi/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

trait takes 0 generic arguments but 1 generic argument was supplied

error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
  --> src/command/wifi/mod.rs:37:16
   |
37 | impl<'a> atat::AtatCmd<{ ATAT_SETWIFISTATIONCONFIG_LEN + 12usize }> for SetWifiStationConfig<'a> {
   |                ^^^^^^^ expected 0 generic arguments
   |
note: trait defined here, with 0 generic parameters
  --> /home/runner/.cargo/git/checkouts/atat-1e6ba3d4ab83bd35/a466836/atat/src/traits.rs:63:11
   |
63 | pub trait AtatCmd {
   |           ^^^^^^^

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

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant field names in struct initialization

warning: redundant field names in struct initialization
   --> src/asynch/control.rs:151:13
    |
151 |             urc_channel: urc_channel,
    |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `urc_channel`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
    = note: `#[warn(clippy::redundant_field_names)]` on by default

Check failure on line 42 in src/command/wifi/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

cannot find function `to_vec` in crate `atat::serde_at`

error[E0425]: cannot find function `to_vec` in crate `atat::serde_at`
  --> src/command/wifi/mod.rs:42:31
   |
42 |         match atat::serde_at::to_vec(
   |                               ^^^^^^ not found in `atat::serde_at`
   |
note: found an item that was configured out
  --> /home/runner/.cargo/git/checkouts/atat-1e6ba3d4ab83bd35/a466836/serde_at/src/lib.rs:27:32
   |
27 | pub use self::ser::{to_string, to_vec};
   |                                ^^^^^^
   = note: the item is gated behind the `heapless` feature

Check failure on line 55 in src/command/wifi/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `as_bytes` is not a member of trait `atat::AtatCmd`

error[E0407]: method `as_bytes` is not a member of trait `atat::AtatCmd`
  --> src/command/wifi/mod.rs:41:5
   |
41 | /     fn as_bytes(&self) -> atat::heapless::Vec<u8, { ATAT_SETWIFISTATIONCONFIG_LEN + 12usize }> {
42 | |         match atat::serde_at::to_vec(
43 | |             self,
44 | |             "+UWSC",
...  |
54 | |         }
55 | |     }
   | |_____^ not a member of trait `atat::AtatCmd`

Check failure on line 429 in src/command/wifi/types.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

failed to resolve: use of undeclared crate or module `defmt`

error[E0433]: failed to resolve: use of undeclared crate or module `defmt`
   --> src/command/wifi/types.rs:429:45
    |
429 | #[derive(Debug, Clone, PartialEq, AtatEnum, defmt::Format)]
    |                                             ^^^^^ use of undeclared crate or module `defmt`

Check failure on line 17 in src/network.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

failed to resolve: use of undeclared crate or module `defmt`

error[E0433]: failed to resolve: use of undeclared crate or module `defmt`
  --> src/network.rs:17:17
   |
17 | #[derive(Debug, defmt::Format)]
   |                 ^^^^^ use of undeclared crate or module `defmt`