Chore(Refactor): Simplify Imports
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
extern crate wifi_rs;
|
||||
|
||||
use std::io;
|
||||
use wifi_rs::WiFi;
|
||||
use wifi_rs::prelude::*;
|
||||
use wifi_rs::{prelude::*, WiFi};
|
||||
|
||||
fn main() -> Result<(), io::Error> {
|
||||
let config = Some(Config {
|
||||
@@ -12,13 +9,7 @@ fn main() -> Result<(), io::Error> {
|
||||
let mut wifi = WiFi::new(config);
|
||||
let config = HotspotConfig::new(Some(HotspotBand::Bg), Some(Channel::One));
|
||||
|
||||
wifi.create_hotspot(
|
||||
"test-hotspot",
|
||||
"password",
|
||||
Some(
|
||||
&config
|
||||
)
|
||||
);
|
||||
wifi.create_hotspot("test-hotspot", "password", Some(&config));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user