-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
This is visible on both stable and nightly. When advising changing write! to writeln!, the clippy outputs no string but still prints the comma. There has to either be no comma after out_file.
warning: using `write!()` with a format string that ends in a single newline
--> src/gap_chat.rs:80:9
|
80 | write!(gap_channel.out_file, "\n").unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(clippy::write_with_newline)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline
help: use `writeln!()` instead
|
80 | writeln!(gap_channel.out_file, ).unwrap();
| ^^^^^^^ --
warning: 1 warning emitted
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy