Chore(Cleanup): Remove Redudant Cases
This commit is contained in:
@@ -25,9 +25,7 @@ Note that only **open**, **WEP** and **WPA-PSK** networks are supported at the m
|
||||
## Example
|
||||
|
||||
```Rust
|
||||
extern crate wifi_rs;
|
||||
use wifi_rs::prelude::*;
|
||||
use wifi_rs::{WiFi, Config};
|
||||
use wifi_rs::{prelude::*, Wifi};
|
||||
|
||||
fn main() -> Result<(), WifiConnectionError> {
|
||||
let config = Some(Config {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
extern crate tempfile;
|
||||
|
||||
use self::tempfile::NamedTempFile;
|
||||
use connectivity::stubs::windows_wifi_profile;
|
||||
use crate::connectivity::stubs::windows_wifi_profile;
|
||||
use std::{io, io::Write};
|
||||
use tempfile::NamedTempFile;
|
||||
|
||||
/// A netowork XML handler for windows, responsible creating
|
||||
/// disposable xml profiles files.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use connectivity::handlers::NetworkXmlProfileHandler;
|
||||
use connectivity::{Connectivity, WifiConnectionError};
|
||||
use platforms::{Connection, WiFi, WifiError, WifiInterface};
|
||||
use crate::{
|
||||
connectivity::{handlers::NetworkXmlProfileHandler, Connectivity, WifiConnectionError},
|
||||
platforms::{Connection, WiFi, WifiError, WifiInterface},
|
||||
};
|
||||
use std::process::Command;
|
||||
|
||||
impl WiFi {
|
||||
@@ -42,11 +43,7 @@ impl Connectivity for WiFi {
|
||||
Self::add_profile(ssid, password)?;
|
||||
|
||||
let output = Command::new("netsh")
|
||||
.args(&[
|
||||
"wlan",
|
||||
"connect",
|
||||
&format!("name={}", ssid),
|
||||
])
|
||||
.args(&["wlan", "connect", &format!("name={}", ssid)])
|
||||
.output()
|
||||
.map_err(|err| WifiConnectionError::FailedToConnect(format!("{}", err)))?;
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
extern crate wifi_rs;
|
||||
|
||||
fn fib(n: usize) -> u32 {
|
||||
let mut first = 1;
|
||||
let mut second = 1;
|
||||
|
||||
Reference in New Issue
Block a user