2021-09-08 14:31:47 +00:00
|
|
|
error: manual implementation of `split_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:11:13
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
LL | let _ = "key=value".splitn(2, '=').nth(1).unwrap();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split_once('=').unwrap().1`
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-split-once` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: manual implementation of `split_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:12:13
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "key=value".splitn(2, '=').skip(1).next().unwrap();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split_once('=').unwrap().1`
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
|
|
error: manual implementation of `split_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:13:18
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
|
|
|
LL | let (_, _) = "key=value".splitn(2, '=').next_tuple().unwrap();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split_once('=')`
|
2021-09-08 14:31:47 +00:00
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
error: manual implementation of `split_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:16:13
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
|
LL | let _ = s.splitn(2, '=').nth(1).unwrap();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=').unwrap().1`
|
2022-05-05 14:12:52 +00:00
|
|
|
|
2021-09-08 14:31:47 +00:00
|
|
|
error: manual implementation of `split_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:19:13
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
LL | let _ = s.splitn(2, '=').nth(1).unwrap();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=').unwrap().1`
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
|
|
error: manual implementation of `split_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:22:13
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
LL | let _ = s.splitn(2, '=').skip(1).next().unwrap();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=').unwrap().1`
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
|
|
error: manual implementation of `split_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:25:17
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
LL | let _ = s.splitn(2, '=').nth(1)?;
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=')?.1`
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
|
|
error: manual implementation of `split_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:26:17
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
LL | let _ = s.splitn(2, '=').skip(1).next()?;
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=')?.1`
|
2021-09-08 14:31:47 +00:00
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
error: manual implementation of `rsplit_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:27:17
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
LL | let _ = s.rsplitn(2, '=').nth(1)?;
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.rsplit_once('=')?.0`
|
2021-09-08 14:31:47 +00:00
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
error: manual implementation of `rsplit_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:28:17
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
LL | let _ = s.rsplitn(2, '=').skip(1).next()?;
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.rsplit_once('=')?.0`
|
2021-09-08 14:31:47 +00:00
|
|
|
|
2021-09-28 17:03:12 +00:00
|
|
|
error: manual implementation of `rsplit_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:36:13
|
2021-09-28 17:03:12 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "key=value".rsplitn(2, '=').nth(1).unwrap();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".rsplit_once('=').unwrap().0`
|
2021-09-28 17:03:12 +00:00
|
|
|
|
|
|
|
error: manual implementation of `rsplit_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:37:18
|
2021-09-28 17:03:12 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
LL | let (_, _) = "key=value".rsplitn(2, '=').next_tuple().unwrap();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".rsplit_once('=').map(|(x, y)| (y, x))`
|
2021-09-28 17:03:12 +00:00
|
|
|
|
|
|
|
error: manual implementation of `rsplit_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:38:13
|
2021-09-28 17:03:12 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
LL | let _ = s.rsplitn(2, '=').nth(1);
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.rsplit_once('=').map(|x| x.0)`
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
error: manual implementation of `split_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:42:5
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
|
LL | let mut iter = "a.b.c".splitn(2, '.');
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL | let l = iter.next().unwrap();
|
|
|
|
| ----------------------------- first usage here
|
|
|
|
LL | let r = iter.next().unwrap();
|
|
|
|
| ----------------------------- second usage here
|
|
|
|
|
|
|
|
|
help: try `split_once`
|
|
|
|
|
|
|
|
|
LL | let (l, r) = "a.b.c".split_once('.').unwrap();
|
|
|
|
|
|
|
|
|
help: remove the `iter` usages
|
|
|
|
|
|
|
|
|
LL - let l = iter.next().unwrap();
|
|
|
|
LL +
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
help: remove the `iter` usages
|
|
|
|
|
|
|
|
|
LL - let r = iter.next().unwrap();
|
|
|
|
LL +
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2021-09-28 17:03:12 +00:00
|
|
|
|
2021-09-08 14:31:47 +00:00
|
|
|
error: manual implementation of `split_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:46:5
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
|
LL | let mut iter = "a.b.c".splitn(2, '.');
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL | let l = iter.next()?;
|
|
|
|
| --------------------- first usage here
|
|
|
|
LL | let r = iter.next()?;
|
|
|
|
| --------------------- second usage here
|
|
|
|
|
|
|
|
|
help: try `split_once`
|
|
|
|
|
|
|
|
|
LL | let (l, r) = "a.b.c".split_once('.')?;
|
|
|
|
|
|
|
|
|
help: remove the `iter` usages
|
|
|
|
|
|
|
|
|
LL - let l = iter.next()?;
|
|
|
|
LL +
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
help: remove the `iter` usages
|
|
|
|
|
|
|
|
|
LL - let r = iter.next()?;
|
|
|
|
LL +
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
error: manual implementation of `rsplit_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:50:5
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
|
LL | let mut iter = "a.b.c".rsplitn(2, '.');
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL | let r = iter.next().unwrap();
|
|
|
|
| ----------------------------- first usage here
|
|
|
|
LL | let l = iter.next().unwrap();
|
|
|
|
| ----------------------------- second usage here
|
|
|
|
|
|
|
|
|
help: try `rsplit_once`
|
|
|
|
|
|
|
|
|
LL | let (l, r) = "a.b.c".rsplit_once('.').unwrap();
|
|
|
|
|
|
|
|
|
help: remove the `iter` usages
|
|
|
|
|
|
|
|
|
LL - let r = iter.next().unwrap();
|
|
|
|
LL +
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
help: remove the `iter` usages
|
|
|
|
|
|
|
|
|
LL - let l = iter.next().unwrap();
|
|
|
|
LL +
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
error: manual implementation of `rsplit_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:54:5
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
|
LL | let mut iter = "a.b.c".rsplitn(2, '.');
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL | let r = iter.next()?;
|
|
|
|
| --------------------- first usage here
|
|
|
|
LL | let l = iter.next()?;
|
|
|
|
| --------------------- second usage here
|
|
|
|
|
|
|
|
|
help: try `rsplit_once`
|
|
|
|
|
|
|
|
|
LL | let (l, r) = "a.b.c".rsplit_once('.')?;
|
|
|
|
|
|
|
|
|
help: remove the `iter` usages
|
|
|
|
|
|
|
|
|
LL - let r = iter.next()?;
|
|
|
|
LL +
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
help: remove the `iter` usages
|
|
|
|
|
|
|
|
|
LL - let l = iter.next()?;
|
|
|
|
LL +
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
error: manual implementation of `split_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:139:13
|
2021-09-08 14:31:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "key=value".splitn(2, '=').nth(1).unwrap();
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split_once('=').unwrap().1`
|
2021-09-08 14:31:47 +00:00
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
error: manual implementation of `split_once`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/manual_split_once.rs:141:5
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
|
LL | let mut iter = "a.b.c".splitn(2, '.');
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL | let a = iter.next().unwrap();
|
|
|
|
| ----------------------------- first usage here
|
|
|
|
LL | let b = iter.next().unwrap();
|
|
|
|
| ----------------------------- second usage here
|
|
|
|
|
|
|
|
|
help: try `split_once`
|
|
|
|
|
|
|
|
|
LL | let (a, b) = "a.b.c".split_once('.').unwrap();
|
|
|
|
|
|
|
|
|
help: remove the `iter` usages
|
|
|
|
|
|
|
|
|
LL - let a = iter.next().unwrap();
|
|
|
|
LL +
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
help: remove the `iter` usages
|
|
|
|
|
|
|
|
|
LL - let b = iter.next().unwrap();
|
|
|
|
LL +
|
2022-06-15 11:15:54 +00:00
|
|
|
|
|
2022-05-05 14:12:52 +00:00
|
|
|
|
|
|
|
error: aborting due to 19 previous errors
|
2021-09-08 14:31:47 +00:00
|
|
|
|