Skip to content

Commit

Permalink
Merge pull request #43 from epage/threads
Browse files Browse the repository at this point in the history
fix: Remove threads flag
  • Loading branch information
epage committed Jul 20, 2019
2 parents c0963a3 + 8b90deb commit 5b6b5bd
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ struct Options {
)]
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""#))]
/// Search binary files.
binary: bool,
Expand Down Expand Up @@ -132,11 +128,7 @@ struct Options {
}

impl Options {
pub fn infer(mut self) -> Self {
if self.path.len() == 1 && self.path[0].is_file() {
self.threads = 1;
}

pub fn infer(self) -> Self {
self
}

Expand Down Expand Up @@ -277,8 +269,7 @@ fn run() -> Result<(), failure::Error> {
for path in &options.path[1..] {
walk.add(path);
}
walk.threads(options.threads)
.hidden(options.ignore_hidden().unwrap_or(true))
walk.hidden(options.ignore_hidden().unwrap_or(true))
.ignore(options.ignore_dot().unwrap_or(true))
.git_global(options.ignore_global().unwrap_or(true))
.git_ignore(options.ignore_vcs().unwrap_or(true))
Expand Down

0 comments on commit 5b6b5bd

Please sign in to comment.