diff options
author | Alan Somers <asomers@gmail.com> | 2020-05-31 15:17:16 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2020-05-31 19:07:15 -0600 |
commit | 1ae5dd8b16aed61958fd3ce488ed7fd459743652 (patch) | |
tree | 17c28555c9b2cd3db3741dcd28b7401d08ad3678 /src/sys/socket/addr.rs | |
parent | 84e66d7a29234d16d62c5fa5bc5b66ad5504c2a2 (diff) | |
download | nix-1ae5dd8b16aed61958fd3ce488ed7fd459743652.zip |
Convert the crate to edition 2018
Diffstat (limited to 'src/sys/socket/addr.rs')
-rw-r--r-- | src/sys/socket/addr.rs | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/sys/socket/addr.rs b/src/sys/socket/addr.rs index 27883254..cdfa704d 100644 --- a/src/sys/socket/addr.rs +++ b/src/sys/socket/addr.rs @@ -1,20 +1,19 @@ use super::sa_family_t; -use {Error, Result, NixPath}; -use errno::Errno; -use libc; +use crate::{Error, Result, NixPath}; +use crate::errno::Errno; use std::{fmt, mem, net, ptr, slice}; use std::ffi::OsStr; use std::hash::{Hash, Hasher}; use std::path::Path; use std::os::unix::ffi::OsStrExt; #[cfg(any(target_os = "android", target_os = "linux"))] -use ::sys::socket::addr::netlink::NetlinkAddr; +use crate::sys::socket::addr::netlink::NetlinkAddr; #[cfg(any(target_os = "android", target_os = "linux"))] -use ::sys::socket::addr::alg::AlgAddr; +use crate::sys::socket::addr::alg::AlgAddr; #[cfg(any(target_os = "ios", target_os = "macos"))] use std::os::unix::io::RawFd; #[cfg(any(target_os = "ios", target_os = "macos"))] -use ::sys::socket::addr::sys_control::SysControlAddr; +use crate::sys::socket::addr::sys_control::SysControlAddr; #[cfg(any(target_os = "android", target_os = "dragonfly", target_os = "freebsd", @@ -851,7 +850,7 @@ impl fmt::Display for SockAddr { #[cfg(any(target_os = "android", target_os = "linux"))] pub mod netlink { - use ::sys::socket::addr::AddressFamily; + use crate::sys::socket::addr::AddressFamily; use libc::{sa_family_t, sockaddr_nl}; use std::{fmt, mem}; @@ -949,11 +948,11 @@ pub mod alg { #[cfg(any(target_os = "ios", target_os = "macos"))] pub mod sys_control { - use ::sys::socket::addr::AddressFamily; + use crate::sys::socket::addr::AddressFamily; use libc::{self, c_uchar}; use std::{fmt, mem}; use std::os::unix::io::RawFd; - use {Errno, Error, Result}; + use crate::{Errno, Error, Result}; // FIXME: Move type into `libc` #[repr(C)] @@ -1021,7 +1020,7 @@ pub mod sys_control { #[cfg(any(target_os = "android", target_os = "linux"))] mod datalink { - use super::{libc, fmt, AddressFamily}; + use super::{fmt, AddressFamily}; /// Hardware Address #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] @@ -1093,7 +1092,7 @@ mod datalink { target_os = "netbsd", target_os = "openbsd"))] mod datalink { - use super::{libc, fmt, AddressFamily}; + use super::{fmt, AddressFamily}; /// Hardware Address #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] @@ -1180,7 +1179,7 @@ mod datalink { #[cfg(target_os = "linux")] pub mod vsock { - use ::sys::socket::addr::AddressFamily; + use crate::sys::socket::addr::AddressFamily; use libc::{sa_family_t, sockaddr_vm}; use std::{fmt, mem}; use std::hash::{Hash, Hasher}; |