1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

Remove unused imports and macro attribute.

This commit is contained in:
Joseph Crail 2015-11-29 20:23:01 -05:00
parent a8bb7f4417
commit 1c7da36f76
3 changed files with 7 additions and 5 deletions

View file

@ -15,9 +15,8 @@ extern crate libc;
#[macro_use]
extern crate uucore;
use std::ffi::CString;
use std::fs;
use std::io::{Error, Write};
use std::io::Write;
use std::path::{Path, PathBuf};
use uucore::fs::UUPathExt;
@ -137,6 +136,9 @@ fn mkdir(path: &Path, mode: u16, verbose: bool) -> i32 {
#[cfg(unix)]
fn chmod(path: &Path, mode: u16) -> i32 {
use std::ffi::CString;
use std::io::Error;
let directory = CString::new(path.as_os_str().to_str().unwrap()).unwrap_or_else(|e| crash!(1, "{}", e));
let mode = mode as libc::mode_t;

View file

@ -12,7 +12,7 @@
extern crate libc;
use std::collections::HashMap;
use std::ffi::{CString, OsString};
use std::ffi::OsString;
use std::env::{args_os};
use std::str::{from_utf8};
@ -328,6 +328,8 @@ enum PathCondition {
fn path(path: &[u8], cond: PathCondition) -> bool {
use libc::{stat, lstat, S_IFMT, S_IFLNK, S_IFBLK, S_IFCHR, S_IFDIR, S_IFREG};
use libc::{S_IFIFO, mode_t};
use std::ffi::CString;
static S_ISUID: mode_t = 0o4000;
static S_ISGID: mode_t = 0o2000;
static S_IFSOCK: mode_t = 0o140000;

View file

@ -9,8 +9,6 @@
extern crate winapi;
extern crate advapi32;
#[macro_use]
extern crate uucore;
use std::ffi::OsString;