2021-12-06 05:33:31 -06:00
|
|
|
error: unnecessary use of `splitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:13:13
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
|
LL | let _ = str.splitn(2, '=').next();
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
|
= note: `-D clippy::needless-splitn` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::needless_splitn)]`
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
error: unnecessary use of `splitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:14:13
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
|
LL | let _ = str.splitn(2, '=').nth(0);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
error: unnecessary use of `splitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:17:18
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
|
LL | let (_, _) = str.splitn(3, '=').next_tuple().unwrap();
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
error: unnecessary use of `rsplitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:20:13
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
|
LL | let _ = str.rsplitn(2, '=').next();
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `str.rsplit('=')`
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
error: unnecessary use of `rsplitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:21:13
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
|
LL | let _ = str.rsplitn(2, '=').nth(0);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `str.rsplit('=')`
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
error: unnecessary use of `rsplitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:24:18
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
|
LL | let (_, _) = str.rsplitn(3, '=').next_tuple().unwrap();
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `str.rsplit('=')`
|
2021-12-06 05:33:31 -06:00
|
|
|
|
2022-05-05 09:12:52 -05:00
|
|
|
error: unnecessary use of `splitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:26:13
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
|
LL | let _ = str.splitn(5, '=').next();
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
error: unnecessary use of `splitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:27:13
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
|
LL | let _ = str.splitn(5, '=').nth(3);
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `str.split('=')`
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
error: unnecessary use of `splitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:33:13
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
|
LL | let _ = s.splitn(2, '=').next()?;
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `s.split('=')`
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
error: unnecessary use of `splitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:34:13
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
|
LL | let _ = s.splitn(2, '=').nth(0)?;
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `s.split('=')`
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
error: unnecessary use of `rsplitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:35:13
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
|
LL | let _ = s.rsplitn(2, '=').next()?;
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `s.rsplit('=')`
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
error: unnecessary use of `rsplitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:36:13
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
|
LL | let _ = s.rsplitn(2, '=').nth(0)?;
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `s.rsplit('=')`
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
error: unnecessary use of `splitn`
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/needless_splitn.rs:44:13
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
|
LL | let _ = "key=value".splitn(2, '=').nth(0).unwrap();
|
2023-07-17 03:19:29 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split('=')`
|
2022-05-05 09:12:52 -05:00
|
|
|
|
|
|
|
error: aborting due to 13 previous errors
|
2021-12-06 05:33:31 -06:00
|
|
|
|