Rename variable

cpu -> threads. threads more accurately represents the number of threads
we will start to run
This commit is contained in:
andy.boot
2019-12-04 20:49:45 +00:00
parent 79416fd5fc
commit 7ba91a4a22
+3 -3
View File
@@ -83,13 +83,13 @@ fn examine_dir(
inodes: &mut HashSet<(u64, u64)>,
data: &mut HashMap<String, u64>,
file_count_no_permission: &mut u64,
cpus: Option<usize>,
threads: Option<usize>,
) {
let mut iter = WalkDir::new(top_dir)
.preload_metadata(true)
.skip_hidden(false);
if let Some(cpus) = cpus {
iter = iter.num_threads(cpus);
if let Some(threads_to_start) = threads {
iter = iter.num_threads(threads_to_start);
}
for entry in iter {
if let Ok(e) = entry {