Chore(Readme): Update README.md

This commit is contained in:
Tochukwu Nkemdilim
2018-07-19 16:30:22 +01:00
parent 3dd0aae87c
commit be1064b383
+5 -5
View File
@@ -25,16 +25,17 @@ Note that only **open**, **WEP** and **WPA-PSK** networks are supported at the m
```RUST ```RUST
extern crate wifi_rs; extern crate wifi_rs;
use wifi_rs::{WiFi, Config, WifiConnectionError}; use wifi_rs::prelude::*;
use wifi_rs::{WiFi, Config};
fn main() -> Result<(), WifiConnectionError> { fn main() -> Result<(), WifiConnectionError> {
let config = Some(Config { let config = Some(Config {
interface: Some("wlo1"), // interface : None would default to `wlan0`. interface: Some("wlo1"),
}); });
let wifi = WiFi::new("AndroidAPSD", config)?; let mut wifi = WiFi::new(config);
match wifi.connect("belm4235") { match wifi.connect("AndroidAPSD22", "belm4235") {
Ok(result) => println!( Ok(result) => println!(
"{}", "{}",
if result == true { if result == true {
@@ -47,7 +48,6 @@ fn main() -> Result<(), WifiConnectionError> {
} }
Ok(()) Ok(())
}
``` ```
## Features ## Features