Skip to content

Add support for PPP mode #37

Add support for PPP mode

Add support for PPP mode #37

GitHub Actions / clippy succeeded Jul 16, 2024 in 0s

clippy

11 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 11
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 74 in src/asynch/network.rs

See this annotation in the file changed.

@github-actions 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`
  --> src/asynch/network.rs:59:13
   |
59 | /             match embassy_futures::select::select(
60 | |                 self.urc_subscription.next_message_pure(),
61 | |                 self.ch.wait_for_wifi_state_change(),
62 | |             )
...  |
73 | |                 _ => {}
74 | |             }
   | |_____________^
   |
   = 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
   |
59 ~             if let embassy_futures::select::Either::First(event) = embassy_futures::select::select(
60 +                 self.urc_subscription.next_message_pure(),
61 +                 self.ch.wait_for_wifi_state_change(),
62 +             )
63 +             .await {
64 +                 #[cfg(feature = "edm")]
65 +                 let Some(event) = event.extract_urc() else {
66 +                     continue;
67 +                 };
68 + 
69 +                 self.handle_urc(event).await?;
70 +             }
   |

Check warning on line 106 in /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panic.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

sub-expression diverges

warning: sub-expression diverges
   --> src/asynch/control.rs:523:77
    |
523 |                         config_param: WifiStationConfig::WpaPskOrPassphrase(todo!("hex values?!")),
    |                                                                             ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression
    = note: `#[warn(clippy::diverging_sub_expression)]` on by default
    = note: this warning originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info)

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

See this annotation in the file changed.

@github-actions github-actions / clippy

method `start_ap` is never used

warning: method `start_ap` is never used
   --> src/asynch/control.rs:310:14
    |
139 | / impl<'a, const INGRESS_BUF_SIZE: usize, const URC_CAPACITY: usize>
140 | |     Control<'a, INGRESS_BUF_SIZE, URC_CAPACITY>
    | |_______________________________________________- method in this implementation
...
310 |       async fn start_ap(&self, ssid: &str) -> Result<(), Error> {
    |                ^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

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

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `psk`

warning: unused variable: `psk`
   --> src/asynch/control.rs:512:41
    |
512 |             WifiAuthentication::Wpa2Psk(psk) => {
    |                                         ^^^ help: if this is intentional, prefix it with an underscore: `_psk`

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 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: `channel`

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

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 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