Skip to content

Commit

Permalink
Use writeln!(fmt, "word") instead of write!(fmt, "word\n") (clippy::w…
Browse files Browse the repository at this point in the history
…rite_with_newline)
  • Loading branch information
matthiaskrgr committed Mar 7, 2020
1 parent f326f0f commit 3f87f8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libstd/sys_common/backtrace.rs
Expand Up @@ -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<'_>| {
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);
bt_fmt.add_context()?;
let mut idx = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/libtest/formatters/mod.rs
Expand Up @@ -36,5 +36,5 @@ pub(crate) fn write_stderr_delimiter(test_output: &mut Vec<u8>, test_name: &Test
Some(_) => test_output.push(b'\n'),
None => (),
}
write!(test_output, "---- {} stderr ----\n", test_name).unwrap();
writeln!(test_output, "---- {} stderr ----", test_name).unwrap();
}

0 comments on commit 3f87f8c

Please sign in to comment.