RS.CLIPPY.WRITELN_EMPTY_STRING

Using `writeln!(buf, \"\")` with an empty string

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: writeln_empty_string. Copyright ©2025 The Rust Team. All rights reserved.

What it does

This lint warns when you use writeln!(buf, "") to print a newline.

Why is this bad?

You should use writeln!(buf), which is simpler.

Example

writeln!(buf, "");

Use instead:

writeln!(buf);