Skip to content

Commit fe03526

Browse files
committed
ConnectionStatus::Idle is never used.
1 parent c1ec87c commit fe03526

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

esp32-wroom-rp/src/wifi.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,8 @@ use super::{Error, FirmwareVersion};
6969
pub enum ConnectionStatus {
7070
/// No device is connected to hardware
7171
NoEsp32 = 255,
72-
/// Temporary status while attempting to connect to WiFi network
73-
Idle = 0,
7472
/// No SSID is available
75-
NoActiveSsid,
73+
NoActiveSsid = 1,
7674
/// WiFi network scan has finished
7775
ScanCompleted,
7876
/// Device is connected to WiFi network
@@ -96,7 +94,6 @@ pub enum ConnectionStatus {
9694
impl From<u8> for ConnectionStatus {
9795
fn from(status: u8) -> ConnectionStatus {
9896
match status {
99-
0 => ConnectionStatus::Idle,
10097
1 => ConnectionStatus::NoActiveSsid,
10198
2 => ConnectionStatus::ScanCompleted,
10299
3 => ConnectionStatus::Connected,
@@ -116,10 +113,6 @@ impl Format for ConnectionStatus {
116113
fn format(&self, fmt: Formatter) {
117114
match self {
118115
ConnectionStatus::NoEsp32 => write!(fmt, "No device is connected to hardware"),
119-
ConnectionStatus::Idle => write!(
120-
fmt,
121-
"Temporary status while attempting to connect to WiFi network"
122-
),
123116
ConnectionStatus::NoActiveSsid => write!(fmt, "No SSID is available"),
124117
ConnectionStatus::ScanCompleted => write!(fmt, "WiFi network scan has finished"),
125118
ConnectionStatus::Connected => write!(fmt, "Device is connected to WiFi network"),

0 commit comments

Comments
 (0)