fix: Remove threads flag

Don't give the user a false sense of hope.  It will be brought back in
as part of #7.
This commit is contained in:
Ed Page 2019-07-19 21:50:36 -06:00
parent c0963a3f2f
commit 8b90debfa5

View file

@ -73,10 +73,6 @@ struct Options {
)] )]
pub format: Format, pub format: Format,
#[structopt(short = "j", long = "threads", default_value = "0")]
/// The approximate number of threads to use.
threads: usize,
#[structopt(long, raw(overrides_with = r#""no-binary""#))] #[structopt(long, raw(overrides_with = r#""no-binary""#))]
/// Search binary files. /// Search binary files.
binary: bool, binary: bool,
@ -132,11 +128,7 @@ struct Options {
} }
impl Options { impl Options {
pub fn infer(mut self) -> Self { pub fn infer(self) -> Self {
if self.path.len() == 1 && self.path[0].is_file() {
self.threads = 1;
}
self self
} }
@ -277,8 +269,7 @@ fn run() -> Result<(), failure::Error> {
for path in &options.path[1..] { for path in &options.path[1..] {
walk.add(path); walk.add(path);
} }
walk.threads(options.threads) walk.hidden(options.ignore_hidden().unwrap_or(true))
.hidden(options.ignore_hidden().unwrap_or(true))
.ignore(options.ignore_dot().unwrap_or(true)) .ignore(options.ignore_dot().unwrap_or(true))
.git_global(options.ignore_global().unwrap_or(true)) .git_global(options.ignore_global().unwrap_or(true))
.git_ignore(options.ignore_vcs().unwrap_or(true)) .git_ignore(options.ignore_vcs().unwrap_or(true))