Skip to content

Commit

Permalink
Address more clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Dec 23, 2024
1 parent cc85b86 commit 26e3584
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ impl core::fmt::Write for EspStdout {
}

#[allow(non_upper_case_globals)]
#[allow(non_snake_case)]
impl From<Newtype<esp_log_level_t>> for LevelFilter {
fn from(level: Newtype<esp_log_level_t>) -> Self {
match level.0 {
Expand Down Expand Up @@ -94,6 +95,7 @@ impl From<LevelFilter> for Newtype<esp_log_level_t> {
}

#[allow(non_upper_case_globals)]
#[allow(non_snake_case)]
impl From<Newtype<esp_log_level_t>> for Level {
fn from(level: Newtype<esp_log_level_t>) -> Self {
match level.0 {
Expand Down
5 changes: 5 additions & 0 deletions src/wifi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ impl From<AuthMethod> for Newtype<wifi_auth_mode_t> {

impl From<Newtype<wifi_auth_mode_t>> for Option<AuthMethod> {
#[allow(non_upper_case_globals)]
#[allow(non_snake_case)]
fn from(mode: Newtype<wifi_auth_mode_t>) -> Self {
match mode.0 {
wifi_auth_mode_t_WIFI_AUTH_OPEN => Some(AuthMethod::None),
Expand Down Expand Up @@ -223,6 +224,7 @@ impl From<Newtype<wifi_sta_config_t>> for ClientConfiguration {
None
},
#[allow(non_upper_case_globals)]
#[allow(non_snake_case)]
scan_method: match conf.0.scan_method {
wifi_scan_method_t_WIFI_FAST_SCAN => ScanMethod::FastScan,
wifi_scan_method_t_WIFI_ALL_CHANNEL_SCAN => match conf.0.sort_method {
Expand Down Expand Up @@ -300,6 +302,7 @@ impl TryFrom<Newtype<&wifi_ap_record_t>> for AccessPointInfo {
type Error = Utf8Error;

#[allow(non_upper_case_globals)]
#[allow(non_snake_case)]
fn try_from(ap_info: Newtype<&wifi_ap_record_t>) -> Result<Self, Self::Error> {
let a = ap_info.0;

Expand Down Expand Up @@ -759,6 +762,7 @@ impl<'d> WifiDriver<'d> {
}

#[allow(non_upper_case_globals)]
#[allow(non_snake_case)]
/// Returns the <`Configuration`> currently in use
pub fn get_configuration(&self) -> Result<Configuration, EspError> {
debug!("Getting configuration");
Expand Down Expand Up @@ -2155,6 +2159,7 @@ impl TryFrom<u32> for WifiSecondChan {

fn try_from(value: u32) -> Result<Self, Self::Error> {
#![allow(non_upper_case_globals)]
#[allow(non_snake_case)]
match value {
wifi_second_chan_t_WIFI_SECOND_CHAN_NONE => Ok(Self::None),
wifi_second_chan_t_WIFI_SECOND_CHAN_ABOVE => Ok(Self::Above),
Expand Down

0 comments on commit 26e3584

Please sign in to comment.