mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 14:52:41 +00:00
Fix "item x imported redundantly" warnings
This commit is contained in:
parent
177ac7ea28
commit
725da985c1
17 changed files with 7 additions and 29 deletions
|
@ -17,7 +17,6 @@ use std::os::unix::ffi::OsStrExt;
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use std::os::unix::fs::{FileTypeExt, PermissionsExt};
|
use std::os::unix::fs::{FileTypeExt, PermissionsExt};
|
||||||
use std::path::{Path, PathBuf, StripPrefixError};
|
use std::path::{Path, PathBuf, StripPrefixError};
|
||||||
use std::string::ToString;
|
|
||||||
|
|
||||||
use clap::{builder::ValueParser, crate_version, Arg, ArgAction, ArgMatches, Command};
|
use clap::{builder::ValueParser, crate_version, Arg, ArgAction, ArgMatches, Command};
|
||||||
use filetime::FileTime;
|
use filetime::FileTime;
|
||||||
|
|
1
src/uu/env/src/env.rs
vendored
1
src/uu/env/src/env.rs
vendored
|
@ -12,7 +12,6 @@ use nix::sys::signal::{raise, sigaction, SaFlags, SigAction, SigHandler, SigSet,
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::io::{self, Write};
|
use std::io::{self, Write};
|
||||||
use std::iter::Iterator;
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use std::os::unix::process::ExitStatusExt;
|
use std::os::unix::process::ExitStatusExt;
|
||||||
use std::process;
|
use std::process;
|
||||||
|
|
|
@ -9,7 +9,6 @@ use clap::builder::ValueParser;
|
||||||
use clap::{crate_version, Arg, ArgAction, Command};
|
use clap::{crate_version, Arg, ArgAction, Command};
|
||||||
use memchr::{memchr3_iter, memchr_iter};
|
use memchr::{memchr3_iter, memchr_iter};
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
use std::convert::From;
|
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::fmt::Display;
|
use std::fmt::Display;
|
||||||
|
|
|
@ -5,9 +5,7 @@
|
||||||
// spell-checker:ignore (ToDO) multifile curr fnames fname xfrd fillloop mockstream
|
// spell-checker:ignore (ToDO) multifile curr fnames fname xfrd fillloop mockstream
|
||||||
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io;
|
use std::io::{self, BufReader};
|
||||||
use std::io::BufReader;
|
|
||||||
use std::vec::Vec;
|
|
||||||
|
|
||||||
use uucore::display::Quotable;
|
use uucore::display::Quotable;
|
||||||
use uucore::show_error;
|
use uucore::show_error;
|
||||||
|
|
|
@ -11,7 +11,6 @@ use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use quick_error::ResultExt;
|
use quick_error::ResultExt;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use std::convert::From;
|
|
||||||
use std::fs::{metadata, File};
|
use std::fs::{metadata, File};
|
||||||
use std::io::{stdin, stdout, BufRead, BufReader, Lines, Read, Write};
|
use std::io::{stdin, stdout, BufRead, BufReader, Lines, Read, Write};
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
|
|
|
@ -9,7 +9,6 @@ use clap::{crate_version, Arg, ArgAction, Command};
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
use std::collections::{BTreeSet, HashMap, HashSet};
|
use std::collections::{BTreeSet, HashMap, HashSet};
|
||||||
use std::default::Default;
|
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fmt::{Display, Formatter, Write as FmtWrite};
|
use std::fmt::{Display, Formatter, Write as FmtWrite};
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
|
|
|
@ -12,7 +12,7 @@ use uucore::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use clap::{crate_version, Arg, ArgAction, Command};
|
use clap::{crate_version, Arg, ArgAction, Command};
|
||||||
use fundu::{self, DurationParser, ParseError, SaturatingInto};
|
use fundu::{DurationParser, ParseError, SaturatingInto};
|
||||||
|
|
||||||
static ABOUT: &str = help_about!("sleep.md");
|
static ABOUT: &str = help_about!("sleep.md");
|
||||||
const USAGE: &str = help_usage!("sleep.md");
|
const USAGE: &str = help_usage!("sleep.md");
|
||||||
|
|
|
@ -17,7 +17,6 @@ use uucore::{
|
||||||
use chrono::{DateTime, Local};
|
use chrono::{DateTime, Local};
|
||||||
use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
|
use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::convert::AsRef;
|
|
||||||
use std::ffi::{OsStr, OsString};
|
use std::ffi::{OsStr, OsString};
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::os::unix::fs::{FileTypeExt, MetadataExt};
|
use std::os::unix::fs::{FileTypeExt, MetadataExt};
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
// For the full copyright and license information, please view the LICENSE
|
// For the full copyright and license information, please view the LICENSE
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
//! Exit status codes produced by `timeout`.
|
//! Exit status codes produced by `timeout`.
|
||||||
use std::convert::From;
|
|
||||||
use uucore::error::UError;
|
use uucore::error::UError;
|
||||||
|
|
||||||
/// Enumerates the exit statuses produced by `timeout`.
|
/// Enumerates the exit statuses produced by `timeout`.
|
||||||
|
|
|
@ -7,7 +7,6 @@ use super::*;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::io::{self, BufRead};
|
use std::io::{self, BufRead};
|
||||||
use std::str;
|
|
||||||
|
|
||||||
/// Wraps a `std::io::BufRead` buffered byte stream and decode it as UTF-8.
|
/// Wraps a `std::io::BufRead` buffered byte stream and decode it as UTF-8.
|
||||||
pub struct BufReadDecoder<B: BufRead> {
|
pub struct BufReadDecoder<B: BufRead> {
|
||||||
|
|
|
@ -474,7 +474,6 @@ pub fn source_is_target_backup(source: &Path, target: &Path, suffix: &str) -> bo
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use std::env;
|
|
||||||
// Required to instantiate mutex in shared context
|
// Required to instantiate mutex in shared context
|
||||||
use clap::Command;
|
use clap::Command;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
|
@ -6,11 +6,9 @@
|
||||||
// spell-checker:ignore (strings) ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUV
|
// spell-checker:ignore (strings) ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUV
|
||||||
// spell-checker:ignore (encodings) lsbf msbf hexupper
|
// spell-checker:ignore (encodings) lsbf msbf hexupper
|
||||||
|
|
||||||
use data_encoding::{self, BASE32, BASE64};
|
|
||||||
|
|
||||||
use std::io::{self, Read, Write};
|
use std::io::{self, Read, Write};
|
||||||
|
|
||||||
use data_encoding::{Encoding, BASE32HEX, BASE64URL, HEXUPPER};
|
use data_encoding::{Encoding, BASE32, BASE32HEX, BASE64, BASE64URL, HEXUPPER};
|
||||||
use data_encoding_macro::new_encoding;
|
use data_encoding_macro::new_encoding;
|
||||||
#[cfg(feature = "thiserror")]
|
#[cfg(feature = "thiserror")]
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
|
@ -63,8 +63,6 @@ use libc::{
|
||||||
mode_t, strerror, S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S_IFMT, S_IFREG, S_IFSOCK,
|
mode_t, strerror, S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S_IFMT, S_IFREG, S_IFSOCK,
|
||||||
};
|
};
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
#[cfg(not(windows))]
|
|
||||||
use std::convert::From;
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use std::ffi::CStr;
|
use std::ffi::CStr;
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
|
|
|
@ -6,16 +6,12 @@
|
||||||
//! Common functions to manage permissions
|
//! Common functions to manage permissions
|
||||||
|
|
||||||
use crate::display::Quotable;
|
use crate::display::Quotable;
|
||||||
use crate::error::strip_errno;
|
use crate::error::{strip_errno, UResult, USimpleError};
|
||||||
use crate::error::UResult;
|
|
||||||
use crate::error::USimpleError;
|
|
||||||
pub use crate::features::entries;
|
pub use crate::features::entries;
|
||||||
use crate::fs::resolve_relative_path;
|
use crate::fs::resolve_relative_path;
|
||||||
use crate::show_error;
|
use crate::show_error;
|
||||||
use clap::Arg;
|
use clap::{Arg, ArgMatches, Command};
|
||||||
use clap::ArgMatches;
|
use libc::{gid_t, uid_t};
|
||||||
use clap::Command;
|
|
||||||
use libc::{self, gid_t, uid_t};
|
|
||||||
use walkdir::WalkDir;
|
use walkdir::WalkDir;
|
||||||
|
|
||||||
use std::io::Error as IOError;
|
use std::io::Error as IOError;
|
||||||
|
|
|
@ -54,8 +54,6 @@ pub unsafe extern "C" fn utmpxname(_file: *const libc::c_char) -> libc::c_int {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|
||||||
use once_cell::sync::Lazy;
|
|
||||||
|
|
||||||
use crate::*; // import macros from `../../macros.rs`
|
use crate::*; // import macros from `../../macros.rs`
|
||||||
|
|
||||||
// In case the c_char array doesn't end with NULL
|
// In case the c_char array doesn't end with NULL
|
||||||
|
|
|
@ -56,7 +56,6 @@
|
||||||
|
|
||||||
// spell-checker:ignore uioerror rustdoc
|
// spell-checker:ignore uioerror rustdoc
|
||||||
|
|
||||||
use clap;
|
|
||||||
use std::{
|
use std::{
|
||||||
error::Error,
|
error::Error,
|
||||||
fmt::{Display, Formatter},
|
fmt::{Display, Formatter},
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// spell-checker:ignore (formats) cymdhm cymdhms mdhm mdhms ymdhm ymdhms datetime mktime
|
// spell-checker:ignore (formats) cymdhm cymdhms mdhm mdhms ymdhm ymdhms datetime mktime
|
||||||
|
|
||||||
use crate::common::util::{AtPath, TestScenario};
|
use crate::common::util::{AtPath, TestScenario};
|
||||||
use filetime::{self, FileTime};
|
use filetime::FileTime;
|
||||||
use std::fs::remove_file;
|
use std::fs::remove_file;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue