1
Fork 0

Use writeln!(fmt, "word") instead of write!(fmt, "word\n") (clippy::write_with_newline)

This commit is contained in:
Matthias Krüger 2020-03-07 00:48:31 +01:00
parent f326f0f70f
commit 3f87f8cfee
2 changed files with 2 additions and 2 deletions

View file

@ -70,7 +70,7 @@ unsafe fn _print_fmt(fmt: &mut fmt::Formatter<'_>, print_fmt: PrintFmt) -> fmt::
let mut print_path = move |fmt: &mut fmt::Formatter<'_>, bows: BytesOrWideString<'_>| { let mut print_path = move |fmt: &mut fmt::Formatter<'_>, bows: BytesOrWideString<'_>| {
output_filename(fmt, bows, print_fmt, cwd.as_ref()) output_filename(fmt, bows, print_fmt, cwd.as_ref())
}; };
write!(fmt, "stack backtrace:\n")?; writeln!(fmt, "stack backtrace:")?;
let mut bt_fmt = BacktraceFmt::new(fmt, print_fmt, &mut print_path); let mut bt_fmt = BacktraceFmt::new(fmt, print_fmt, &mut print_path);
bt_fmt.add_context()?; bt_fmt.add_context()?;
let mut idx = 0; let mut idx = 0;

View file

@ -36,5 +36,5 @@ pub(crate) fn write_stderr_delimiter(test_output: &mut Vec<u8>, test_name: &Test
Some(_) => test_output.push(b'\n'), Some(_) => test_output.push(b'\n'),
None => (), None => (),
} }
write!(test_output, "---- {} stderr ----\n", test_name).unwrap(); writeln!(test_output, "---- {} stderr ----", test_name).unwrap();
} }