mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
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
This commit is contained in:
commit
c4fbe54ac3
@ -159,7 +159,7 @@ declare_clippy_lint! {
|
||||
/// ```
|
||||
/// Use instead:
|
||||
/// ```rust
|
||||
/// let hello = "hesuo worpd".replace(&['s', 'u', 'p'], "l");
|
||||
/// let hello = "hesuo worpd".replace(['s', 'u', 'p'], "l");
|
||||
/// ```
|
||||
#[clippy::version = "1.65.0"]
|
||||
pub COLLAPSIBLE_STR_REPLACE,
|
||||
|
Loading…
Reference in New Issue
Block a user