Skip to content

Commit 4065702

Browse files
STRING_ADD example
1 parent 8789f4e commit 4065702

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clippy_lints/src/strings.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ declare_clippy_lint! {
6060
/// let x = "Hello".to_owned();
6161
/// x + ", World";
6262
/// ```
63+
///
64+
/// Use instead:
65+
/// ```rust
66+
/// let x = "Hello".to_owned();
67+
/// x.push_str(", World");
68+
/// ```
6369
#[clippy::version = "pre 1.29.0"]
6470
pub STRING_ADD,
6571
restriction,

0 commit comments

Comments
 (0)