summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-02-29 12:54:29 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-02-29 15:03:43 +0100
commit94a830cdc2c09dd068e9a5d2b51c8a99b444a33e (patch)
treed7a8a933559034beb1dcff5e5a83e35ad432d879
parent345c544a2b5691941542742adaf57767269be1a8 (diff)
Fix: Also write newlines
Fixes: e7e5d306458 ("Remove calls to exit() and replace them with error propagation up to main()") Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/core/imag-diagnostics/src/lib.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/bin/core/imag-diagnostics/src/lib.rs b/bin/core/imag-diagnostics/src/lib.rs
index 49906b28..1b3ec62b 100644
--- a/bin/core/imag-diagnostics/src/lib.rs
+++ b/bin/core/imag-diagnostics/src/lib.rs
@@ -199,34 +199,34 @@ impl ImagApplication for ImagDiagnostics {
let mut out = rt.stdout();
- write!(out, "imag version {}", { env!("CARGO_PKG_VERSION") })?;
- write!(out, "")?;
- write!(out, "{} entries", n)?;
+ writeln!(out, "imag version {}", { env!("CARGO_PKG_VERSION") })?;
+ writeln!(out)?;
+ writeln!(out, "{} entries", n)?;
for (k, v) in version_counts {
- write!(out, "{} entries with store version '{}'", v, k)?;
+ writeln!(out, "{} entries with store version '{}'", v, k)?;
}
if n != 0 {
- write!(out, "{} header sections in the average entry", sum_header_sections / n)?;
- write!(out, "{} average content bytecount", sum_bytecount_content / n)?;
- write!(out, "{} average overall bytecount", sum_overall_byte_size / n)?;
+ writeln!(out, "{} header sections in the average entry", sum_header_sections / n)?;
+ writeln!(out, "{} average content bytecount", sum_bytecount_content / n)?;
+ writeln!(out, "{} average overall bytecount", sum_overall_byte_size / n)?;
if let Some((num, path)) = max_overall_byte_size {
- write!(out, "Largest Entry ({} bytes): {}", num, path.local_display_string())?;
+ writeln!(out, "Largest Entry ({} bytes): {}", num, path.local_display_string())?;
}
- write!(out, "{} average internal link count per entry", num_links / n)?;
+ writeln!(out, "{} average internal link count per entry", num_links / n)?;
if let Some((num, path)) = max_links {
- write!(out, "Entry with most internal links ({}): {}",
+ writeln!(out, "Entry with most internal links ({}): {}",
num,
path.local_display_string())?;
}
- write!(out, "{} verified entries", verified_count)?;
- write!(out, "{} unverified entries", unverified_count)?;
+ writeln!(out, "{} verified entries", verified_count)?;
+ writeln!(out, "{} unverified entries", unverified_count)?;
if verbose {
for unve in unverified_entries.iter() {
- write!(out, "Unverified: {}", unve)?;
+ writeln!(out, "Unverified: {}", unve)?;
}
}
}