mirror of
https://github.com/uutils/findutils.git
synced 2026-06-10 15:48:30 -07:00
find: fix "item x imported redundantly" warnings
This commit is contained in:
@@ -33,7 +33,6 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -61,7 +61,6 @@ mod tests {
|
||||
|
||||
use super::*;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://opensource.org/licenses/MIT.
|
||||
|
||||
use onig::{self, Regex, RegexOptions, Syntax};
|
||||
use onig::{Regex, RegexOptions, Syntax};
|
||||
|
||||
/// Parse a string as a POSIX Basic Regular Expression.
|
||||
fn parse_bre(expr: &str, options: RegexOptions) -> Result<Regex, onig::Error> {
|
||||
|
||||
@@ -60,7 +60,6 @@ impl Matcher for LinkNameMatcher {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
use std::io::ErrorKind;
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
//! when parsing command-line options (e.g. "-foo -o -bar -baz" is equivalent
|
||||
//! to "-foo -o ( -bar -baz )", not "( -foo -o -bar ) -baz").
|
||||
use std::error::Error;
|
||||
use std::iter::Iterator;
|
||||
use std::path::Path;
|
||||
use walkdir::DirEntry;
|
||||
|
||||
@@ -357,11 +356,9 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::find::matchers::quit::QuitMatcher;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::{Matcher, MatcherIO};
|
||||
use crate::find::tests::FakeDependencies;
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
use walkdir::DirEntry;
|
||||
|
||||
/// Simple Matcher impl that has side effects
|
||||
pub struct HasSideEffects;
|
||||
|
||||
@@ -544,8 +544,7 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::find::tests::fix_up_slashes;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
use crate::find::Config;
|
||||
use walkdir::{DirEntry, WalkDir};
|
||||
use walkdir::WalkDir;
|
||||
|
||||
/// Helper function for tests to get a DirEntry object. directory should
|
||||
/// probably be a string starting with "test_data/" (cargo's tests run with
|
||||
|
||||
@@ -33,7 +33,6 @@ impl Matcher for NameMatcher {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
use std::io::ErrorKind;
|
||||
|
||||
@@ -33,7 +33,6 @@ impl Matcher for PathMatcher {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
// Variants of fix_up_slashes that properly escape the forward slashes for
|
||||
|
||||
@@ -144,7 +144,6 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
#[track_caller]
|
||||
|
||||
@@ -57,7 +57,6 @@ impl Matcher for Printer {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::fix_up_slashes;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
|
||||
@@ -671,7 +671,6 @@ mod tests {
|
||||
|
||||
use super::*;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::fix_up_slashes;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ impl Matcher for PruneMatcher {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -22,7 +22,6 @@ impl Matcher for QuitMatcher {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -121,7 +121,6 @@ impl Matcher for RegexMatcher {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
const POSIX_BASIC_INTERVALS_RE: &str = r".*/ab\{1,3\}c";
|
||||
|
||||
@@ -106,10 +106,7 @@ impl Matcher for SizeMatcher {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::{ComparableValue, Matcher};
|
||||
use crate::find::tests::FakeDependencies;
|
||||
// need to explicitly use non-pub members
|
||||
use super::{byte_size_to_unit_size, Unit};
|
||||
|
||||
#[test]
|
||||
fn test_byte_size_to_unit_size() {
|
||||
|
||||
@@ -84,7 +84,6 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -139,15 +139,13 @@ impl FileTimeMatcher {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::fs::{File, OpenOptions};
|
||||
use std::io::{Read, Write};
|
||||
use std::io::Read;
|
||||
use std::thread;
|
||||
use std::time::{Duration, SystemTime};
|
||||
use std::time::Duration;
|
||||
use tempfile::Builder;
|
||||
use walkdir::DirEntry;
|
||||
|
||||
use super::*;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::{ComparableValue, Matcher};
|
||||
use crate::find::tests::FakeDependencies;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -69,7 +69,6 @@ impl Matcher for TypeMatcher {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::find::matchers::tests::get_dir_entry_for;
|
||||
use crate::find::matchers::Matcher;
|
||||
use crate::find::tests::FakeDependencies;
|
||||
use std::io::ErrorKind;
|
||||
|
||||
|
||||
+2
-4
@@ -264,11 +264,9 @@ pub fn find_main<'a>(args: &[&str], deps: &'a dyn Dependencies<'a>) -> i32 {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::fs;
|
||||
use std::io::{Cursor, ErrorKind, Read, Write};
|
||||
use std::time::{Duration, SystemTime};
|
||||
use std::vec::Vec;
|
||||
use std::io::{Cursor, ErrorKind, Read};
|
||||
use std::time::Duration;
|
||||
use tempfile::Builder;
|
||||
|
||||
#[cfg(unix)]
|
||||
|
||||
@@ -8,7 +8,6 @@ use std::cell::RefCell;
|
||||
use std::env;
|
||||
use std::io::{Cursor, Read, Write};
|
||||
use std::time::SystemTime;
|
||||
use std::vec::Vec;
|
||||
use walkdir::{DirEntry, WalkDir};
|
||||
|
||||
use findutils::find::matchers::MatcherIO;
|
||||
|
||||
Reference in New Issue
Block a user