2022-08-31 13:24:45 +00:00
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:18:27
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hesuo worpd".replace('s', "l").replace('u', "l");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['s', 'u'], "l")`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::collapsible-str-replace` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::collapsible_str_replace)]`
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:20:27
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hesuo worpd".replace('s', l).replace('u', l);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['s', 'u'], l)`
|
|
|
|
|
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:22:27
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hesuo worpd".replace('s', "l").replace('u', "l").replace('p', "l");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['s', 'u', 'p'], "l")`
|
|
|
|
|
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:25:10
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | .replace('s', "l")
|
|
|
|
| __________^
|
|
|
|
LL | | .replace('u', "l")
|
|
|
|
LL | | .replace('p', "l")
|
|
|
|
LL | | .replace('d', "l");
|
|
|
|
| |__________________________^ help: replace with: `replace(['s', 'u', 'p', 'd'], "l")`
|
|
|
|
|
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:30:27
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hesuo world".replace(s, "l").replace('u', "l");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace([s, 'u'], "l")`
|
|
|
|
|
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:32:27
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hesuo worpd".replace(s, "l").replace('u', "l").replace('p', "l");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace([s, 'u', 'p'], "l")`
|
|
|
|
|
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:34:27
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hesuo worpd".replace(s, "l").replace(u, "l").replace('p', "l");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace([s, u, 'p'], "l")`
|
|
|
|
|
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:36:27
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hesuo worpd".replace(s, "l").replace(u, "l").replace(p, "l");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace([s, u, p], "l")`
|
|
|
|
|
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:38:27
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hesuo worlp".replace('s', "l").replace('u', "l").replace('p', "d");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['s', 'u'], "l")`
|
|
|
|
|
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:40:45
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hesuo worpd".replace('s', "x").replace('u', "l").replace('p', "l");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['u', 'p'], "l")`
|
|
|
|
|
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:43:47
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hesudo worpd".replace("su", "l").replace('d', "l").replace('p', "l");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['d', 'p'], "l")`
|
|
|
|
|
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:45:28
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hesudo worpd".replace(d, "l").replace('p', "l").replace("su", "l");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace([d, 'p'], "l")`
|
|
|
|
|
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:47:27
|
2022-08-31 13:24:45 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hesuo world".replace(get_filter(), "l").replace('s', "l");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace([get_filter(), 's'], "l")`
|
|
|
|
|
2022-12-17 13:12:54 +00:00
|
|
|
error: used consecutive `str::replace` call
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/collapsible_str_replace.rs:84:16
|
2022-12-17 13:12:54 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "".replace('a', "1.58").replace('b', "1.58");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(['a', 'b'], "1.58")`
|
|
|
|
|
|
|
|
error: aborting due to 14 previous errors
|
2022-08-31 13:24:45 +00:00
|
|
|
|