Chore(Refactor): Simplify Imports
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
use connectivity::{Connectivity, WifiConnectionError};
|
||||
use platforms::{Connection, WiFi, WifiError, WifiInterface};
|
||||
use crate::{
|
||||
connectivity::{Connectivity, WifiConnectionError},
|
||||
platforms::{Connection, WiFi, WifiError, WifiInterface},
|
||||
};
|
||||
use std::process::Command;
|
||||
|
||||
/// Wireless network connectivity functionality.
|
||||
|
||||
@@ -20,10 +20,7 @@ pub struct HotspotConfig {
|
||||
#[allow(dead_code)]
|
||||
impl HotspotConfig {
|
||||
pub fn new(band: Option<HotspotBand>, channel: Option<Channel>) -> HotspotConfig {
|
||||
HotspotConfig {
|
||||
band,
|
||||
channel
|
||||
}
|
||||
HotspotConfig { band, channel }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
use hotspot::WifiHotspot;
|
||||
use platforms::WiFi;
|
||||
use crate::{hotspot::WifiHotspot, platforms::WiFi};
|
||||
|
||||
/// Configuration for a wireless hotspot.
|
||||
#[allow(dead_code)]
|
||||
pub struct HotspotConfig {}
|
||||
pub struct HotspotConfig;
|
||||
|
||||
/// Wireless hotspot functionality for a wifi interface.
|
||||
impl WifiHotspot for WiFi {}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
use hotspot::{WifiHotspot, WifiHotspotError};
|
||||
use platforms::{WiFi, WifiError, WifiInterface};
|
||||
use crate::{
|
||||
hotspot::{WifiHotspot, WifiHotspotError},
|
||||
platforms::{WiFi, WifiError, WifiInterface},
|
||||
};
|
||||
use std::process::Command;
|
||||
|
||||
/// Configuration for a wireless hotspot.
|
||||
pub struct HotspotConfig {}
|
||||
pub struct HotspotConfig;
|
||||
|
||||
impl WiFi {
|
||||
/// Attempts to turn on a wireless networ if down.
|
||||
|
||||
+4
-4
@@ -4,10 +4,10 @@ mod platforms;
|
||||
|
||||
/// Pre-requisite module for `Connectivity`, `Hotspot` functionality.
|
||||
pub mod prelude {
|
||||
pub use crate::connectivity::*;
|
||||
pub use crate::hotspot::*;
|
||||
pub use crate::hotspot::providers::prelude::*;
|
||||
pub use crate::platforms::Config;
|
||||
pub use crate::connectivity::*;
|
||||
pub use crate::hotspot::providers::prelude::*;
|
||||
pub use crate::hotspot::*;
|
||||
pub use crate::platforms::Config;
|
||||
}
|
||||
|
||||
pub use crate::platforms::WiFi;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use platforms::{Config, WifiError, WifiInterface};
|
||||
use crate::platforms::{Config, WifiError, WifiInterface};
|
||||
use std::process::Command;
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
use platforms::Config;
|
||||
use platforms::WifiError;
|
||||
use platforms::WifiInterface;
|
||||
use crate::platforms::{Config, WifiError, WifiInterface};
|
||||
use std::process::Command;
|
||||
|
||||
const WINDOWS_INTERFACE: &'static str = "Wireless Network Connection";
|
||||
|
||||
Reference in New Issue
Block a user