Skip to content

Commit c4fbe54

Browse files
committed
Auto merge of #9817 - mgrachev:patch-1, r=Manishearth
Update lint example for `collapsible_str_replace` To fix this warning: ``` warning: the borrowed expression implements the required traits --> src/fixes/quote_character.rs:16:43 | 16 | let hello = "hesuo worpd".replace(&['s', 'u', 'p'], "l"); | ^^^^^^^^^^^^^^^^ help: change this to: `['s', 'u', 'p']` | = note: `#[warn(clippy::needless_borrow)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow ``` *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: none
2 parents b9ca319 + 7001085 commit c4fbe54

File tree

1 file changed

+1
-1
lines changed
  • clippy_lints/src/methods

1 file changed

+1
-1
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ declare_clippy_lint! {
159159
/// ```
160160
/// Use instead:
161161
/// ```rust
162-
/// let hello = "hesuo worpd".replace(&['s', 'u', 'p'], "l");
162+
/// let hello = "hesuo worpd".replace(['s', 'u', 'p'], "l");
163163
/// ```
164164
#[clippy::version = "1.65.0"]
165165
pub COLLAPSIBLE_STR_REPLACE,

0 commit comments

Comments
 (0)