We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 565d3fd commit 43ac256Copy full SHA for 43ac256
clippy_lints/src/format_push_string.rs
@@ -14,6 +14,12 @@ declare_clippy_lint! {
14
/// ### Why is this bad?
15
/// Introduces an extra, avoidable heap allocation.
16
///
17
+ /// ### Known problems
18
+ /// `format!` returns a `String` but `write!` returns a `Result`.
19
+ /// Thus you are forced to ignore the `Err` variant to achieve the same API.
20
+ ///
21
+ /// While using `write!` in the suggested way should never fail, this isn't necessarily clear to the programmer.
22
23
/// ### Example
24
/// ```rust
25
/// let mut s = String::new();
0 commit comments