MAINT: Use writeln! instead of write!

This commit is contained in:
Jeremy Wall 2019-03-26 21:28:58 -04:00
parent 97d2493441
commit 76899cb481

View File

@ -161,9 +161,9 @@ impl<C: FilePositioned> StackPrinter<C> {
Some(ref pb) => pb.to_string_lossy().to_string(), Some(ref pb) => pb.to_string_lossy().to_string(),
None => "<eval>".to_string(), None => "<eval>".to_string(),
}; };
write!( writeln!(
w, w,
"{}{}: at {} line: {}, column: {}\n", "{}{}: at {} line: {}, column: {}",
tabstop, tabstop,
err.get_msg(), err.get_msg(),
file, file,
@ -173,7 +173,7 @@ impl<C: FilePositioned> StackPrinter<C> {
tabstop = "\t"; tabstop = "\t";
curr_err = err.get_cause(); curr_err = err.get_cause();
if curr_err.is_some() { if curr_err.is_some() {
write!(w, "Caused by: \n")?; writeln!(w, "Caused by:")?;
} }
} }
} }