fix missing newline in error msg

This commit is contained in:
Scott Lamb 2021-02-11 11:06:13 -08:00
parent 9a5957d5ef
commit fb5b414297

View File

@ -35,7 +35,7 @@ use std::fmt::{self, Write};
pub fn prettify_failure(e: &failure::Error) -> String { pub fn prettify_failure(e: &failure::Error) -> String {
let mut msg = e.to_string(); let mut msg = e.to_string();
for cause in e.iter_causes() { for cause in e.iter_causes() {
write!(&mut msg, "caused by: {}", cause).unwrap(); write!(&mut msg, "\ncaused by: {}", cause).unwrap();
} }
if e.backtrace().is_empty() { if e.backtrace().is_empty() {
write!(&mut msg, "\n(set environment variable RUST_BACKTRACE=1 to see backtraces)") write!(&mut msg, "\n(set environment variable RUST_BACKTRACE=1 to see backtraces)")