mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 18:15:01 +00:00
41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
error: unnecessary use of `splitn`
|
|
--> $DIR/needless_splitn.rs:15:13
|
|
|
|
|
LL | let _ = str.splitn(2, '=').next();
|
|
| ^^^^^^^^^^^^^^^^^^ help: try this: `str.split('=')`
|
|
|
|
|
= note: `-D clippy::needless-splitn` implied by `-D warnings`
|
|
|
|
error: unnecessary use of `splitn`
|
|
--> $DIR/needless_splitn.rs:16:13
|
|
|
|
|
LL | let _ = str.splitn(2, '=').nth(0);
|
|
| ^^^^^^^^^^^^^^^^^^ help: try this: `str.split('=')`
|
|
|
|
error: unnecessary use of `splitn`
|
|
--> $DIR/needless_splitn.rs:19:18
|
|
|
|
|
LL | let (_, _) = str.splitn(3, '=').next_tuple().unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^ help: try this: `str.split('=')`
|
|
|
|
error: unnecessary use of `rsplitn`
|
|
--> $DIR/needless_splitn.rs:22:13
|
|
|
|
|
LL | let _ = str.rsplitn(2, '=').next();
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try this: `str.rsplit('=')`
|
|
|
|
error: unnecessary use of `rsplitn`
|
|
--> $DIR/needless_splitn.rs:23:13
|
|
|
|
|
LL | let _ = str.rsplitn(2, '=').nth(0);
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try this: `str.rsplit('=')`
|
|
|
|
error: unnecessary use of `rsplitn`
|
|
--> $DIR/needless_splitn.rs:26:18
|
|
|
|
|
LL | let (_, _) = str.rsplitn(3, '=').next_tuple().unwrap();
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try this: `str.rsplit('=')`
|
|
|
|
error: aborting due to 6 previous errors
|
|
|