Skip to content

Commit 3f87f8c

Browse files
committed
Use writeln!(fmt, "word") instead of write!(fmt, "word\n") (clippy::write_with_newline)
1 parent f326f0f commit 3f87f8c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libstd/sys_common/backtrace.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ unsafe fn _print_fmt(fmt: &mut fmt::Formatter<'_>, print_fmt: PrintFmt) -> fmt::
7070
let mut print_path = move |fmt: &mut fmt::Formatter<'_>, bows: BytesOrWideString<'_>| {
7171
output_filename(fmt, bows, print_fmt, cwd.as_ref())
7272
};
73-
write!(fmt, "stack backtrace:\n")?;
73+
writeln!(fmt, "stack backtrace:")?;
7474
let mut bt_fmt = BacktraceFmt::new(fmt, print_fmt, &mut print_path);
7575
bt_fmt.add_context()?;
7676
let mut idx = 0;

src/libtest/formatters/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ pub(crate) fn write_stderr_delimiter(test_output: &mut Vec<u8>, test_name: &Test
3636
Some(_) => test_output.push(b'\n'),
3737
None => (),
3838
}
39-
write!(test_output, "---- {} stderr ----\n", test_name).unwrap();
39+
writeln!(test_output, "---- {} stderr ----", test_name).unwrap();
4040
}

0 commit comments

Comments
 (0)