Skip to content

Commit 5171e71

Browse files
more fixes
1 parent 06172d0 commit 5171e71

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

netwatch/src/interfaces/linux.rs

+2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ use super::DefaultRouteDetails;
1313
pub enum Error {
1414
#[error("IO {0}")]
1515
Io(#[from] std::io::Error),
16+
#[cfg(not(target_os = "android"))]
1617
#[error("no netlink response")]
1718
NoResponse,
19+
#[cfg(not(target_os = "android"))]
1820
#[error("interface not found")]
1921
InterfaceNotFound,
2022
#[error("iface field is missing")]

netwatch/src/interfaces/windows.rs

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ pub enum Error {
1919
Io(#[from] std::io::Error),
2020
#[error("not route found")]
2121
NoRoute,
22+
#[error("WMI {0}")]
23+
Wmi(#[from] wmi::WMIError),
2224
}
2325

2426
fn get_default_route() -> Result<DefaultRouteDetails, Error> {

netwatch/src/netmon/windows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl CallbackHandler {
102102
fn register_unicast_address_change_callback(
103103
&mut self,
104104
cb: UnicastCallback,
105-
) -> Result<UnicastCallbackHandle> {
105+
) -> Result<UnicastCallbackHandle, Error> {
106106
trace!("registering unicast callback");
107107
let mut handle = Handle::default();
108108
let cb = Arc::new(cb);

0 commit comments

Comments
 (0)