From cb2919660baf4ecb464d52d69147947923538e7b Mon Sep 17 00:00:00 2001 From: Ben S Date: Thu, 28 Jan 2016 15:40:53 +0000 Subject: [PATCH] Remove unused imports --- src/base.rs | 13 +++++++------ src/mock.rs | 2 -- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/base.rs b/src/base.rs index 90840d5..9ae556e 100644 --- a/src/base.rs +++ b/src/base.rs @@ -41,7 +41,7 @@ use libc::{c_char, time_t}; #[cfg(target_os = "linux")] use libc::c_char; -use os::*; +//use os::*; #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly"))] @@ -368,10 +368,8 @@ pub mod os { #[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd", target_os = "dragonfly"))] pub mod unix { use std::path::Path; - use std::sync::Arc; - use libc::{uid_t, gid_t}; - use super::super::{c_passwd, c_group, members, from_raw_buf, User, Group}; + use super::super::{c_passwd, c_group, members, from_raw_buf, Group}; /// Unix-specific extensions for `User`s. pub trait UserExt { @@ -431,6 +429,9 @@ pub mod os { } } + #[cfg(any(target_os = "linux"))] + use super::super::User; + #[cfg(any(target_os = "linux"))] impl UserExt for User { fn home_dir(&self) -> &Path { @@ -477,8 +478,8 @@ pub mod os { #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly"))] pub mod bsd { use std::path::Path; - use libc::{uid_t, gid_t, time_t}; - use super::super::{c_passwd, from_raw_buf, User}; + use libc::time_t; + use super::super::{c_passwd, User}; #[derive(Clone)] pub struct UserExtras { diff --git a/src/mock.rs b/src/mock.rs index 682a83e..3712861 100644 --- a/src/mock.rs +++ b/src/mock.rs @@ -152,8 +152,6 @@ mod test { use traits::{Users, Groups}; use std::sync::Arc; - use os::unix::{UserExt, GroupExt}; - #[test] fn current_username() { let mut users = MockUsers::with_current_uid(1337);