rust/tests/ui/needless_splitn.stderr

83 lines
2.5 KiB
Plaintext
Raw Normal View History

error: unnecessary use of `splitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:13:13
|
LL | let _ = str.splitn(2, '=').next();
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
|
= note: `-D clippy::needless-splitn` implied by `-D warnings`
error: unnecessary use of `splitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:14:13
|
LL | let _ = str.splitn(2, '=').nth(0);
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
error: unnecessary use of `splitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:17:18
|
LL | let (_, _) = str.splitn(3, '=').next_tuple().unwrap();
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
error: unnecessary use of `rsplitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:20:13
|
LL | let _ = str.rsplitn(2, '=').next();
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^^ help: try: `str.rsplit('=')`
error: unnecessary use of `rsplitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:21:13
|
LL | let _ = str.rsplitn(2, '=').nth(0);
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^^ help: try: `str.rsplit('=')`
error: unnecessary use of `rsplitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:24:18
|
LL | let (_, _) = str.rsplitn(3, '=').next_tuple().unwrap();
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^^ help: try: `str.rsplit('=')`
error: unnecessary use of `splitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:26:13
|
LL | let _ = str.splitn(5, '=').next();
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
error: unnecessary use of `splitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:27:13
|
LL | let _ = str.splitn(5, '=').nth(3);
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
error: unnecessary use of `splitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:33:13
|
LL | let _ = s.splitn(2, '=').next()?;
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^ help: try: `s.split('=')`
error: unnecessary use of `splitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:34:13
|
LL | let _ = s.splitn(2, '=').nth(0)?;
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^ help: try: `s.split('=')`
error: unnecessary use of `rsplitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:35:13
|
LL | let _ = s.rsplitn(2, '=').next()?;
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^ help: try: `s.rsplit('=')`
error: unnecessary use of `rsplitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:36:13
|
LL | let _ = s.rsplitn(2, '=').nth(0)?;
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^ help: try: `s.rsplit('=')`
error: unnecessary use of `splitn`
2023-07-27 06:40:22 -05:00
--> $DIR/needless_splitn.rs:44:13
|
LL | let _ = "key=value".splitn(2, '=').nth(0).unwrap();
2023-07-01 06:08:01 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split('=')`
error: aborting due to 13 previous errors