From 9f738ad9950dc39a9f5b44c14e21ccdc1a08e1ab Mon Sep 17 00:00:00 2001 From: sharkdp Date: Fri, 3 Apr 2020 11:36:54 +0200 Subject: [PATCH] Move filter up from internal --- src/{internal => }/filter/mod.rs | 0 src/{internal => }/filter/size.rs | 0 src/{internal => }/filter/time.rs | 0 src/internal/mod.rs | 1 - src/internal/opts.rs | 2 +- src/main.rs | 10 ++++------ 6 files changed, 5 insertions(+), 8 deletions(-) rename src/{internal => }/filter/mod.rs (100%) rename src/{internal => }/filter/size.rs (100%) rename src/{internal => }/filter/time.rs (100%) diff --git a/src/internal/filter/mod.rs b/src/filter/mod.rs similarity index 100% rename from src/internal/filter/mod.rs rename to src/filter/mod.rs diff --git a/src/internal/filter/size.rs b/src/filter/size.rs similarity index 100% rename from src/internal/filter/size.rs rename to src/filter/size.rs diff --git a/src/internal/filter/time.rs b/src/filter/time.rs similarity index 100% rename from src/internal/filter/time.rs rename to src/filter/time.rs diff --git a/src/internal/mod.rs b/src/internal/mod.rs index 1e8241a..08fe18a 100644 --- a/src/internal/mod.rs +++ b/src/internal/mod.rs @@ -4,7 +4,6 @@ use std::ffi::{OsStr, OsString}; use regex_syntax::hir::Hir; use regex_syntax::ParserBuilder; -pub mod filter; pub mod opts; macro_rules! print_error { diff --git a/src/internal/opts.rs b/src/internal/opts.rs index e46a3bf..dfc8cbe 100644 --- a/src/internal/opts.rs +++ b/src/internal/opts.rs @@ -1,6 +1,6 @@ use crate::exec::CommandTemplate; use crate::filetypes::FileTypes; -use crate::internal::filter::{SizeFilter, TimeFilter}; +use crate::filter::{SizeFilter, TimeFilter}; use lscolors::LsColors; use regex::bytes::RegexSet; use std::{path::PathBuf, sync::Arc, time::Duration}; diff --git a/src/main.rs b/src/main.rs index 1637c05..36a1b22 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,8 @@ mod app; mod exec; mod exit_codes; mod filetypes; -pub mod fshelper; +mod filter; +mod fshelper; mod output; mod walk; @@ -22,11 +23,8 @@ use regex::bytes::{RegexBuilder, RegexSetBuilder}; use crate::exec::CommandTemplate; use crate::filetypes::FileTypes; -use crate::internal::{ - filter::{SizeFilter, TimeFilter}, - opts::FdOptions, - pattern_has_uppercase_char, transform_args_with_exec, -}; +use crate::filter::{SizeFilter, TimeFilter}; +use crate::internal::{opts::FdOptions, pattern_has_uppercase_char, transform_args_with_exec}; // We use jemalloc for performance reasons, see https://github.com/sharkdp/fd/pull/481 #[cfg(all(not(windows), not(target_env = "musl")))]