X-Git-Url: https://code.octet-stream.net/netwatcher/blobdiff_plain/473c9605820f4531f9d40823338fa4bf8718dd6f..18f2e52c414d1c98bbca61288b35f8b43cec9f8b:/src/list_unix.rs?ds=inline diff --git a/src/list_unix.rs b/src/list_unix.rs index a7cd881..4a49140 100644 --- a/src/list_unix.rs +++ b/src/list_unix.rs @@ -13,12 +13,12 @@ struct CandidateInterface { } pub(crate) fn list_interfaces() -> Result { - let addrs = getifaddrs().map_err(|e| Error::Getifaddrs(e))?; + let addrs = getifaddrs().map_err(|e| Error::Getifaddrs(e.to_string()))?; let mut candidates = HashMap::new(); for addr in addrs { - let index = - if_nametoindex(addr.interface_name.as_str()).map_err(|e| Error::GetInterfaceName(e))?; + let index = if_nametoindex(addr.interface_name.as_str()) + .map_err(|e| Error::GetInterfaceName(e.to_string()))?; let candidate = candidates .entry(addr.interface_name.clone()) .or_insert_with(|| CandidateInterface {