From c131e1544134717712a6b612e112def43bbf40cd Mon Sep 17 00:00:00 2001 From: shellrow <81893184+shellrow@users.noreply.github.com> Date: Sun, 27 Mar 2022 17:50:02 +0900 Subject: [PATCH] Update unix.rs --- src/interface/unix.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/interface/unix.rs b/src/interface/unix.rs index 085ab4a..59f7d79 100644 --- a/src/interface/unix.rs +++ b/src/interface/unix.rs @@ -10,9 +10,12 @@ use std::mem::{self, MaybeUninit}; use std::os::raw::c_char; use std::str::from_utf8_unchecked; use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; +use crate::interface::InterfaceType; + +#[cfg(any(target_os = "linux", target_os = "android"))] use std::convert::TryFrom; +#[cfg(any(target_os = "linux", target_os = "android"))] use std::fs::read_to_string; -use crate::interface::InterfaceType; #[cfg(any(target_os = "macos", target_os = "openbsd", target_os = "freebsd", target_os = "netbsd", target_os = "ios"))] pub fn interfaces() -> Vec { @@ -83,7 +86,7 @@ pub fn interfaces() -> Vec { } #[cfg(any(target_os = "macos", target_os = "openbsd", target_os = "freebsd", target_os = "netbsd", target_os = "ios"))] -pub fn get_interface_type(if_name: String) -> InterfaceType { +pub fn get_interface_type(_if_name: String) -> InterfaceType { // TODO InterfaceType::Unknown }