Chore(Test): Update Test Example
This commit is contained in:
@@ -28,6 +28,15 @@ fn main() -> Result<(), io::Error> {
|
||||
.takes_value(true)
|
||||
.help("Password of the wireless network."),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("interface")
|
||||
.short("i")
|
||||
.long("interface")
|
||||
.multiple(false)
|
||||
.default_value("wlan0")
|
||||
.takes_value(true)
|
||||
.help("Wireless interface to connect through."),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
// Get Password
|
||||
@@ -36,6 +45,9 @@ fn main() -> Result<(), io::Error> {
|
||||
// Get SSID
|
||||
let ssid = matches.value_of("ssid").unwrap();
|
||||
|
||||
// Get Wireless Interface
|
||||
let ssid = matches.value_of("ssid").unwrap();
|
||||
|
||||
let wifi = WiFi::new(ssid)?;
|
||||
println!("Connection Status: {}", wifi.connect(password));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user