1 error: manual implementation of `split_once`
2 --> $DIR/manual_split_once.rs:14:13
4 LL | let _ = "key=value".splitn(2, '=').nth(1).unwrap();
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".split_once('=').unwrap().1`
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, '=').skip(1).next().unwrap();
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".split_once('=').unwrap().1`
15 error: manual implementation of `split_once`
16 --> $DIR/manual_split_once.rs:16:18
18 LL | let (_, _) = "key=value".splitn(2, '=').next_tuple().unwrap();
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".split_once('=')`
21 error: manual implementation of `split_once`
22 --> $DIR/manual_split_once.rs:19:13
24 LL | let _ = s.splitn(2, '=').nth(1).unwrap();
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.split_once('=').unwrap().1`
27 error: manual implementation of `split_once`
28 --> $DIR/manual_split_once.rs:22:13
30 LL | let _ = s.splitn(2, '=').nth(1).unwrap();
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.split_once('=').unwrap().1`
33 error: manual implementation of `split_once`
34 --> $DIR/manual_split_once.rs:25:13
36 LL | let _ = s.splitn(2, '=').skip(1).next().unwrap();
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.split_once('=').unwrap().1`
39 error: manual implementation of `split_once`
40 --> $DIR/manual_split_once.rs:28:17
42 LL | let _ = s.splitn(2, '=').nth(1)?;
43 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.split_once('=')?.1`
45 error: manual implementation of `split_once`
46 --> $DIR/manual_split_once.rs:29:17
48 LL | let _ = s.splitn(2, '=').skip(1).next()?;
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.split_once('=')?.1`
51 error: manual implementation of `rsplit_once`
52 --> $DIR/manual_split_once.rs:30:17
54 LL | let _ = s.rsplitn(2, '=').nth(1)?;
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.rsplit_once('=')?.0`
57 error: manual implementation of `rsplit_once`
58 --> $DIR/manual_split_once.rs:31:17
60 LL | let _ = s.rsplitn(2, '=').skip(1).next()?;
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.rsplit_once('=')?.0`
63 error: manual implementation of `rsplit_once`
64 --> $DIR/manual_split_once.rs:39:13
66 LL | let _ = "key=value".rsplitn(2, '=').nth(1).unwrap();
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".rsplit_once('=').unwrap().0`
69 error: manual implementation of `rsplit_once`
70 --> $DIR/manual_split_once.rs:40:18
72 LL | let (_, _) = "key=value".rsplitn(2, '=').next_tuple().unwrap();
73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".rsplit_once('=').map(|(x, y)| (y, x))`
75 error: manual implementation of `rsplit_once`
76 --> $DIR/manual_split_once.rs:41:13
78 LL | let _ = s.rsplitn(2, '=').nth(1);
79 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `s.rsplit_once('=').map(|x| x.0)`
81 error: manual implementation of `split_once`
82 --> $DIR/manual_split_once.rs:45:5
84 LL | let mut iter = "a.b.c".splitn(2, '.');
85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86 LL | let l = iter.next().unwrap();
87 | ----------------------------- first usage here
88 LL | let r = iter.next().unwrap();
89 | ----------------------------- second usage here
91 help: try `split_once`
93 LL | let (l, r) = "a.b.c".split_once('.').unwrap();
95 help: remove the `iter` usages
97 LL - let l = iter.next().unwrap();
100 help: remove the `iter` usages
102 LL - let r = iter.next().unwrap();
106 error: manual implementation of `split_once`
107 --> $DIR/manual_split_once.rs:49:5
109 LL | let mut iter = "a.b.c".splitn(2, '.');
110 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111 LL | let l = iter.next()?;
112 | --------------------- first usage here
113 LL | let r = iter.next()?;
114 | --------------------- second usage here
116 help: try `split_once`
118 LL | let (l, r) = "a.b.c".split_once('.')?;
120 help: remove the `iter` usages
122 LL - let l = iter.next()?;
125 help: remove the `iter` usages
127 LL - let r = iter.next()?;
131 error: manual implementation of `rsplit_once`
132 --> $DIR/manual_split_once.rs:53:5
134 LL | let mut iter = "a.b.c".rsplitn(2, '.');
135 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 LL | let r = iter.next().unwrap();
137 | ----------------------------- first usage here
138 LL | let l = iter.next().unwrap();
139 | ----------------------------- second usage here
141 help: try `rsplit_once`
143 LL | let (l, r) = "a.b.c".rsplit_once('.').unwrap();
145 help: remove the `iter` usages
147 LL - let r = iter.next().unwrap();
150 help: remove the `iter` usages
152 LL - let l = iter.next().unwrap();
156 error: manual implementation of `rsplit_once`
157 --> $DIR/manual_split_once.rs:57:5
159 LL | let mut iter = "a.b.c".rsplitn(2, '.');
160 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
161 LL | let r = iter.next()?;
162 | --------------------- first usage here
163 LL | let l = iter.next()?;
164 | --------------------- second usage here
166 help: try `rsplit_once`
168 LL | let (l, r) = "a.b.c".rsplit_once('.')?;
170 help: remove the `iter` usages
172 LL - let r = iter.next()?;
175 help: remove the `iter` usages
177 LL - let l = iter.next()?;
181 error: manual implementation of `split_once`
182 --> $DIR/manual_split_once.rs:142:13
184 LL | let _ = "key=value".splitn(2, '=').nth(1).unwrap();
185 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".split_once('=').unwrap().1`
187 error: manual implementation of `split_once`
188 --> $DIR/manual_split_once.rs:144:5
190 LL | let mut iter = "a.b.c".splitn(2, '.');
191 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
192 LL | let a = iter.next().unwrap();
193 | ----------------------------- first usage here
194 LL | let b = iter.next().unwrap();
195 | ----------------------------- second usage here
197 help: try `split_once`
199 LL | let (a, b) = "a.b.c".split_once('.').unwrap();
201 help: remove the `iter` usages
203 LL - let a = iter.next().unwrap();
206 help: remove the `iter` usages
208 LL - let b = iter.next().unwrap();
212 error: aborting due to 19 previous errors