Update library to support latest versions of Rust and Windows
This commit is contained in:
@@ -45,14 +45,14 @@ impl Connectivity for WiFi {
|
||||
.args(&[
|
||||
"wlan",
|
||||
"connect",
|
||||
&format!("name={}", *self.connection.unwrap().ssid),
|
||||
&format!("name={}", ssid),
|
||||
])
|
||||
.output()
|
||||
.map_err(|err| WifiConnectionError::FailedToConnect(format!("{}", err)))?;
|
||||
|
||||
if !String::from_utf8_lossy(&output.stdout)
|
||||
.as_ref()
|
||||
.contains("successfully activated")
|
||||
.contains("completed successfully")
|
||||
{
|
||||
return Ok(false);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ impl WifiInterface for Windows {
|
||||
.output()
|
||||
.map_err(|err| WifiError::IoError(err))?;
|
||||
|
||||
Ok(!String::from_utf8_lossy(&output.stdout).contains("disconnected"))
|
||||
Ok(!String::from_utf8_lossy(&output.stdout).contains("There is no wireless interface"))
|
||||
}
|
||||
|
||||
/// Turn on the wireless network adapter.
|
||||
|
||||
Reference in New Issue
Block a user