diff options
Diffstat (limited to 'src/ifaddrs.rs')
-rw-r--r-- | src/ifaddrs.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/ifaddrs.rs b/src/ifaddrs.rs index 2b3024b5..61d36ff4 100644 --- a/src/ifaddrs.rs +++ b/src/ifaddrs.rs @@ -4,7 +4,6 @@ //! of interfaces and their associated addresses. use std::ffi; -use std::fmt; use std::iter::Iterator; use std::mem; use std::option::Option; @@ -16,7 +15,7 @@ use sys::socket::SockAddr; use net::if_::*; /// Describes a single address for an interface as returned by `getifaddrs`. -#[derive(Clone, Eq, Hash, PartialEq)] +#[derive(Clone, Eq, Hash, PartialEq, Debug)] pub struct InterfaceAddress { /// Name of the network interface pub interface_name: String, @@ -32,12 +31,6 @@ pub struct InterfaceAddress { pub destination: Option<SockAddr>, } -impl fmt::Debug for InterfaceAddress { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "InterfaceAddress ({:?})", self.interface_name) - } -} - cfg_if! { if #[cfg(any(target_os = "emscripten", target_os = "fuchsia", target_os = "linux"))] { fn get_ifu_from_sockaddr(info: &libc::ifaddrs) -> *const libc::sockaddr { |