1 error: manual implementation of `split_once`
2 --> $DIR/manual_split_once.rs:13:13
4 LL | let _ = "key=value".splitn(2, '=').next();
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `Some("key=value".split_once('=').map_or("key=value", |x| x.0))`
7 = note: `-D clippy::manual-split-once` implied by `-D warnings`
9 error: manual implementation of `split_once`
10 --> $DIR/manual_split_once.rs:15:13
12 LL | let _ = "key=value".splitn(2, '=').next().unwrap();
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".split_once('=').map_or("key=value", |x| x.0)`
15 error: manual implementation of `split_once`
16 --> $DIR/manual_split_once.rs:16:13
18 LL | let _ = "key=value".splitn(2, '=').nth(0).unwrap();
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".split_once('=').map_or("key=value", |x| x.0)`
21 error: manual implementation of `split_once`
22 --> $DIR/manual_split_once.rs:17:13
24 LL | let _ = "key=value".splitn(2, '=').nth(1).unwrap();
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".split_once('=').unwrap().1`
27 error: manual implementation of `split_once`
28 --> $DIR/manual_split_once.rs:18:13
30 LL | let _ = "key=value".splitn(2, '=').skip(1).next().unwrap();
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".split_once('=').unwrap().1`
33 error: manual implementation of `split_once`
34 --> $DIR/manual_split_once.rs:19:18
36 LL | let (_, _) = "key=value".splitn(2, '=').next_tuple().unwrap();
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".split_once('=')`
39 error: manual implementation of `split_once`
40 --> $DIR/manual_split_once.rs:22:13
42 LL | let _ = s.splitn(2, '=').next().unwrap();
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.split_once('=').map_or(&*s, |x| x.0)`
45 error: manual implementation of `split_once`
46 --> $DIR/manual_split_once.rs:25:13
48 LL | let _ = s.splitn(2, '=').nth(0).unwrap();
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.split_once('=').map_or(&*s, |x| x.0)`
51 error: manual implementation of `split_once`
52 --> $DIR/manual_split_once.rs:28:13
54 LL | let _ = s.splitn(2, '=').skip(0).next().unwrap();
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.split_once('=').map_or(*s, |x| x.0)`
57 error: manual implementation of `split_once`
58 --> $DIR/manual_split_once.rs:31:17
60 LL | let _ = s.splitn(2, "key=value").next()?;
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.split_once("key=value").map_or(s, |x| x.0)`
63 error: manual implementation of `split_once`
64 --> $DIR/manual_split_once.rs:32:17
66 LL | let _ = s.splitn(2, "key=value").nth(1)?;
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.split_once("key=value")?.1`
69 error: manual implementation of `split_once`
70 --> $DIR/manual_split_once.rs:33:17
72 LL | let _ = s.splitn(2, "key=value").skip(1).next()?;
73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.split_once("key=value")?.1`
75 error: manual implementation of `rsplit_once`
76 --> $DIR/manual_split_once.rs:42:13
78 LL | let _ = "key=value".rsplitn(2, '=').nth(1).unwrap();
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".rsplit_once('=').unwrap().0`
81 error: manual implementation of `rsplit_once`
82 --> $DIR/manual_split_once.rs:43:13
84 LL | let _ = "key=value".rsplitn(2, '=').nth(0);
85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".rsplit_once('=').map(|x| x.1)`
87 error: manual implementation of `rsplit_once`
88 --> $DIR/manual_split_once.rs:44:18
90 LL | let (_, _) = "key=value".rsplitn(2, '=').next_tuple().unwrap();
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".rsplit_once('=').map(|(x, y)| (y, x))`
93 error: manual implementation of `split_once`
94 --> $DIR/manual_split_once.rs:55:13
96 LL | let _ = "key=value".splitn(2, '=').nth(1).unwrap();
97 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".split_once('=').unwrap().1`
99 error: aborting due to 16 previous errors