Merge pull request #8 from TNkemdilim/hotfix/handle-linux-compilation

Fix(Linux): Include 'CreationFailed' Error In Conditional Compilation
This commit is contained in:
Tochukwu Nkemdilim
2021-01-19 16:16:19 +01:00
committed by GitHub
2 changed files with 6 additions and 4 deletions
+4 -3
View File
@@ -7,14 +7,15 @@ use std::fmt;
/// Error that might occur when interacting managing wireless hotspot.
#[derive(Debug)]
pub enum WifiHotspotError {
/// Failed to ceate wireless hotspot.
#[cfg(target_os = "linux")]
#[cfg(target_os = "windows")]
/// Failed to ceate wireless hotspot.s
#[cfg(any(target_os = "windows", target_os = "linux"))]
CreationFailed,
/// Failed to stop wireless hotspot service. Try turning off
/// the wireless interface via ```wifi.turn_off()```.
#[cfg(target_os = "linux")]
FailedToStop(std::io::Error),
/// A wireless interface error occurred.
Other { kind: WifiError },
}
+2 -1
View File
@@ -26,8 +26,9 @@ pub enum HotspotBand {
Bg,
}
#[derive(Debug, Clone, Copy)]
/// Channel to broadcast wireless hotspot on.
#[allow(dead_code)]
#[derive(Debug, Clone, Copy)]
pub enum Channel {
/// Channel 1
One = 1,