From f95c207b930666b2c33a8466a8a39c772cb07d95 Mon Sep 17 00:00:00 2001 From: Nicolas Dusart Date: Thu, 27 Jul 2017 21:47:38 +0200 Subject: [PATCH] merge use statements --- src/sys/socket/addr.rs | 3 +-- src/sys/socket/mod.rs | 3 +-- src/sys/socket/sockopt.rs | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/sys/socket/addr.rs b/src/sys/socket/addr.rs index b4739dd664..71001534a6 100644 --- a/src/sys/socket/addr.rs +++ b/src/sys/socket/addr.rs @@ -812,8 +812,7 @@ pub mod netlink { #[cfg(any(target_os = "ios", target_os = "macos"))] pub mod sys_control { use ::sys::socket::addr::{AddressFamily}; - use libc; - use libc::{c_uchar, uint16_t, uint32_t}; + use libc::{self, c_uchar, uint16_t, uint32_t}; use std::{fmt, mem}; use std::hash::{Hash, Hasher}; use std::os::unix::io::RawFd; diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 73b5233b8e..86129fcf00 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -5,11 +5,10 @@ use {Error, Errno, Result}; use features; use fcntl::{fcntl, FD_CLOEXEC, O_NONBLOCK}; use fcntl::FcntlArg::{F_SETFD, F_SETFL}; -use libc::{c_void, c_int, socklen_t, size_t, pid_t, uid_t, gid_t}; +use libc::{self, c_void, c_int, socklen_t, size_t, pid_t, uid_t, gid_t}; use std::{mem, ptr, slice}; use std::os::unix::io::RawFd; use sys::uio::IoVec; -use libc; mod addr; mod ffi; diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs index 308a0ed61b..3c13c53968 100644 --- a/src/sys/socket/sockopt.rs +++ b/src/sys/socket/sockopt.rs @@ -1,8 +1,7 @@ use super::{ffi, GetSockOpt, SetSockOpt}; -use libc; use {Errno, Result}; use sys::time::TimeVal; -use libc::{c_int, uint8_t, c_void, socklen_t}; +use libc::{self, c_int, uint8_t, c_void, socklen_t}; use std::mem; use std::os::unix::io::RawFd;