From 67f6fdf6a749ad6d616e32de8b1fa221d2837c65 Mon Sep 17 00:00:00 2001 From: Pramod Bisht Date: Sun, 25 Mar 2018 20:06:37 +0530 Subject: [PATCH] Code formating --- src/app.rs | 11 ++++++++++- src/main.rs | 2 +- src/walk.rs | 4 +++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/app.rs b/src/app.rs index 190acf1..1f823db 100644 --- a/src/app.rs +++ b/src/app.rs @@ -83,7 +83,16 @@ pub fn build_app() -> App<'static, 'static> { .number_of_values(1) .takes_value(true) .value_name("filetype") - .possible_values(&["f", "file", "d", "directory", "l", "symlink", "x", "executable"]) + .possible_values(&[ + "f", + "file", + "d", + "directory", + "l", + "symlink", + "x", + "executable", + ]) .hide_possible_values(true), ) .arg( diff --git a/src/main.rs b/src/main.rs index d58bed1..d041735 100644 --- a/src/main.rs +++ b/src/main.rs @@ -164,7 +164,7 @@ fn main() { "x" | "executable" => { file_types.executables_only = true; file_types.files = true; - }, + } _ => unreachable!(), } } diff --git a/src/walk.rs b/src/walk.rs index 33b60ee..47026b3 100644 --- a/src/walk.rs +++ b/src/walk.rs @@ -202,7 +202,9 @@ pub fn scan(path_vec: &[PathBuf], pattern: Arc, config: Arc) { if (entry_type.is_file() && !file_types.files) || (entry_type.is_dir() && !file_types.directories) || (entry_type.is_symlink() && !file_types.symlinks) - || (entry.metadata().is_ok() && !output::is_executable(&entry.metadata().unwrap()) && file_types.executables_only) + || (entry.metadata().is_ok() + && !output::is_executable(&entry.metadata().unwrap()) + && file_types.executables_only) { return ignore::WalkState::Continue; } else if !(entry_type.is_file() || entry_type.is_dir()