1
0
mirror of https://github.com/jht5945/finding.git synced 2025-12-27 13:20:03 +08:00
This commit is contained in:
2020-05-01 22:04:18 +08:00
parent 9818c25f15
commit 713cbdc67f

View File

@@ -50,9 +50,14 @@ impl CountCell {
self.cell.get()
}
#[inline]
fn add(&self, i: u64) {
self.cell.set(self.cell.get() + i);
}
#[inline]
fn add_one(&self) {
self.cell.set(self.cell.get() + 1);
self.add(1);
}
}
@@ -86,7 +91,7 @@ fn find_huge_files(options: &Options, dir_path: &Path) {
let len = metadata.len();
if len >= options.parsed_huge_file_size {
huge_file_count.add_one();
huge_file_size.add_one();
huge_file_size.add(len);
clear_n_print_message(MessageType::OK, &format!("{} [{}]", p_str, get_display_size(len as i64)));
}
},