Skip to content
Myr

Move filetypes up from 'internal'

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by sharkdp · committed by David Peter · parent 2cfb1a2 · Browse files · 5 files+25 added−28 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

5 files+25 added−28 removed

  • other:+25 added−28 removed

5 files+25 added−28 removed

deleted:src/internal/file_types.rs-20 removed
1/// Whether or not to show2pub struct FileTypes {3 pub files: bool,4 pub directories: bool,5 pub symlinks: bool,6 pub executables_only: bool,7 pub empty_only: bool,8}910impl Default for FileTypes {11 fn default() -> FileTypes {12 FileTypes {13 files: false,14 directories: false,15 symlinks: false,16 executables_only: false,17 empty_only: false,18 }19 }20}
modified:src/internal/mod.rs-3 removed
2 unmodified lines
34use regex_syntax::hir::Hir;5use regex_syntax::ParserBuilder;67pub use self::file_types::FileTypes;89mod file_types;7pub mod filter;8pub mod opts;910macro_rules! print_error {
176 unmodified lines
modified:src/internal/opts.rs+2 added-4 removed
1use crate::exec::CommandTemplate;2use crate::internal::{3 filter::{SizeFilter, TimeFilter},4 FileTypes,5};2use crate::filetypes::FileTypes;3use crate::internal::filter::{SizeFilter, TimeFilter};4use lscolors::LsColors;5use regex::bytes::RegexSet;6use std::{path::PathBuf, sync::Arc, time::Duration};7
78 unmodified lines
added:src/filetypes.rs+20 added
1/// Whether or not to show2pub struct FileTypes {3 pub files: bool,4 pub directories: bool,5 pub symlinks: bool,6 pub executables_only: bool,7 pub empty_only: bool,8}910impl Default for FileTypes {11 fn default() -> FileTypes {12 FileTypes {13 files: false,14 directories: false,15 symlinks: false,16 executables_only: false,17 empty_only: false,18 }19 }20}
modified:src/main.rs+3 added-1 removed
2 unmodified lines
34mod app;5mod exec;6mod exit_codes;7mod filetypes;8pub mod fshelper;9mod output;10mod walk;11
8 unmodified lines
20use lscolors::LsColors;21use regex::bytes::{RegexBuilder, RegexSetBuilder};2223use crate::exec::CommandTemplate;24use crate::filetypes::FileTypes;25use crate::internal::{26 filter::{SizeFilter, TimeFilter},27 opts::FdOptions,26 pattern_has_uppercase_char, transform_args_with_exec, FileTypes,28 pattern_has_uppercase_char, transform_args_with_exec,29};3031// We use jemalloc for performance reasons, see https://github.com/sharkdp/fd/pull/48132#[cfg(all(not(windows), not(target_env = "musl")))]
286 unmodified lines