mirror of
https://github.com/jht5945/finding.git
synced 2025-12-29 14:10:05 +08:00
fix size
This commit is contained in:
@@ -50,9 +50,14 @@ impl CountCell {
|
|||||||
self.cell.get()
|
self.cell.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn add(&self, i: u64) {
|
||||||
|
self.cell.set(self.cell.get() + i);
|
||||||
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn add_one(&self) {
|
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();
|
let len = metadata.len();
|
||||||
if len >= options.parsed_huge_file_size {
|
if len >= options.parsed_huge_file_size {
|
||||||
huge_file_count.add_one();
|
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)));
|
clear_n_print_message(MessageType::OK, &format!("{} [{}]", p_str, get_display_size(len as i64)));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user