Skip to content

Commit

Permalink
Workaroundd issue 11921 in ESP IDF
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Jul 22, 2023
1 parent 5ccb542 commit 42e60e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wifi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ pub mod config {

impl From<&ScanConfig> for wifi_scan_config_t {
fn from(s: &ScanConfig) -> Self {
#[allow(clippy::needless_update)]
Self {
bssid: s.bssid.map_or(core::ptr::null(), |v| v.as_ptr()) as *mut u8,
ssid: s.ssid.as_ref().map_or(core::ptr::null(), |v| v.as_ptr()) as *mut u8,
Expand All @@ -113,6 +114,7 @@ pub mod config {
channel: s.channel.unwrap_or_default(),
scan_type: matches!(s.scan_type, ScanType::Active { .. }).into(),
show_hidden: s.show_hidden,
..Default::default()
}
}
}
Expand Down

0 comments on commit 42e60e8

Please sign in to comment.