mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Remove unused imports and macro attribute.
This commit is contained in:
+4
-2
@@ -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;
|
||||
|
||||
|
||||
+3
-1
@@ -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;
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
extern crate winapi;
|
||||
extern crate advapi32;
|
||||
|
||||
#[macro_use]
|
||||
extern crate uucore;
|
||||
|
||||
use std::ffi::OsString;
|
||||
|
||||
Reference in New Issue
Block a user