1
0
mirror of https://github.com/jht5945/finding.git synced 2025-12-27 13:20:03 +08:00

unwrap_or -> ok

This commit is contained in:
2020-04-28 00:42:17 +08:00
parent 03bbba3193
commit 0e4024337f

View File

@@ -81,7 +81,7 @@ fn find_huge_files(options: &Options, dir_path: &Path) {
print_lastline(&get_term_width_message(&format!("Scanning: {}", p_str), 10)); print_lastline(&get_term_width_message(&format!("Scanning: {}", p_str), 10));
} }
true true
}).unwrap_or(()); }).ok();
clear_n_print_message(MessageType::OK, &format!("Total file count: {}, huge file count: {}, total huge file size: {}", clear_n_print_message(MessageType::OK, &format!("Total file count: {}, huge file count: {}, total huge file size: {}",
total_file_count_cell.into_inner(), total_file_count_cell.into_inner(),
huge_file_count_cell.into_inner(), huge_file_count_cell.into_inner(),
@@ -196,7 +196,7 @@ fn find_text_files(options: &Options, dir_path: &Path) {
print_lastline(&get_term_width_message(&format!("Scanning: {}", p_str), 10)); print_lastline(&get_term_width_message(&format!("Scanning: {}", p_str), 10));
} }
true true
}).unwrap_or(()); }).ok();
print_lastline(EMPTY); print_lastline(EMPTY);
print_message(MessageType::OK, &format!("Total dir count: {}, scaned dir count: {}", print_message(MessageType::OK, &format!("Total dir count: {}, scaned dir count: {}",
total_dir_count_cell.into_inner(), total_dir_count_cell.into_inner(),