Remove unused imports

This commit is contained in:
Ben S
2016-01-28 15:40:53 +00:00
parent b5c4d07f6b
commit cb2919660b
2 changed files with 7 additions and 8 deletions
+7 -6
View File
@@ -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 {
-2
View File
@@ -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);