summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2019-09-20 23:23:30 +0200
committerDavid Peter <sharkdp@users.noreply.github.com>2019-09-20 23:28:01 +0200
commit1db1cdb24f4d9c16d9d1e0a923169a2a78ab361e (patch)
treec323ef12e2b5b2cac4a9a11b1d1bfa2beb38bd79
parent981481db9b4aca66258e2dd8d5377c1026a9c911 (diff)
Print warnings before the result
-rw-r--r--src/main.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs
index d4dc1d7..84bb105 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -15,11 +15,6 @@ use humansize::{file_size_opts, FileSize};
use walk::Walk;
fn print_result(size: u64, errors: &[walk::Err], verbose: bool) {
- println!(
- "{} ({} bytes)",
- size.file_size(file_size_opts::DECIMAL).unwrap(),
- size
- );
if verbose {
for err in errors {
match err {
@@ -39,9 +34,14 @@ fn print_result(size: u64, errors: &[walk::Err], verbose: bool) {
}
} else if !errors.is_empty() {
eprintln!(
- "Warning: the results may be tainted. Re-run with -v/--verbose to print all errors."
+ "[diskus warning] the results may be tainted. Re-run with -v/--verbose to print all errors."
);
}
+ println!(
+ "{} ({} bytes)",
+ size.file_size(file_size_opts::DECIMAL).unwrap(),
+ size
+ );
}
fn main() {