1 error: manual implementation of `split_once`
2 --> $DIR/manual_split_once.rs:11:13
4 LL | let _ = "key=value".splitn(2, '=').nth(1).unwrap();
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split_once('=').unwrap().1`
7 = note: `-D clippy::manual-split-once` implied by `-D warnings`
8 = help: to override `-D warnings` add `#[allow(clippy::manual_split_once)]`
10 error: manual implementation of `split_once`
11 --> $DIR/manual_split_once.rs:12:13
13 LL | let _ = "key=value".splitn(2, '=').skip(1).next().unwrap();
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split_once('=').unwrap().1`
16 error: manual implementation of `split_once`
17 --> $DIR/manual_split_once.rs:13:18
19 LL | let (_, _) = "key=value".splitn(2, '=').next_tuple().unwrap();
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split_once('=')`
22 error: manual implementation of `split_once`
23 --> $DIR/manual_split_once.rs:16:13
25 LL | let _ = s.splitn(2, '=').nth(1).unwrap();
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=').unwrap().1`
28 error: manual implementation of `split_once`
29 --> $DIR/manual_split_once.rs:19:13
31 LL | let _ = s.splitn(2, '=').nth(1).unwrap();
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=').unwrap().1`
34 error: manual implementation of `split_once`
35 --> $DIR/manual_split_once.rs:22:13
37 LL | let _ = s.splitn(2, '=').skip(1).next().unwrap();
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=').unwrap().1`
40 error: manual implementation of `split_once`
41 --> $DIR/manual_split_once.rs:25:17
43 LL | let _ = s.splitn(2, '=').nth(1)?;
44 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=')?.1`
46 error: manual implementation of `split_once`
47 --> $DIR/manual_split_once.rs:26:17
49 LL | let _ = s.splitn(2, '=').skip(1).next()?;
50 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.split_once('=')?.1`
52 error: manual implementation of `rsplit_once`
53 --> $DIR/manual_split_once.rs:27:17
55 LL | let _ = s.rsplitn(2, '=').nth(1)?;
56 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.rsplit_once('=')?.0`
58 error: manual implementation of `rsplit_once`
59 --> $DIR/manual_split_once.rs:28:17
61 LL | let _ = s.rsplitn(2, '=').skip(1).next()?;
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.rsplit_once('=')?.0`
64 error: manual implementation of `rsplit_once`
65 --> $DIR/manual_split_once.rs:36:13
67 LL | let _ = "key=value".rsplitn(2, '=').nth(1).unwrap();
68 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".rsplit_once('=').unwrap().0`
70 error: manual implementation of `rsplit_once`
71 --> $DIR/manual_split_once.rs:37:18
73 LL | let (_, _) = "key=value".rsplitn(2, '=').next_tuple().unwrap();
74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".rsplit_once('=').map(|(x, y)| (y, x))`
76 error: manual implementation of `rsplit_once`
77 --> $DIR/manual_split_once.rs:38:13
79 LL | let _ = s.rsplitn(2, '=').nth(1);
80 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.rsplit_once('=').map(|x| x.0)`
82 error: manual implementation of `split_once`
83 --> $DIR/manual_split_once.rs:42:5
85 LL | let mut iter = "a.b.c".splitn(2, '.');
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87 LL | let l = iter.next().unwrap();
88 | ----------------------------- first usage here
89 LL | let r = iter.next().unwrap();
90 | ----------------------------- second usage here
92 help: try `split_once`
94 LL | let (l, r) = "a.b.c".split_once('.').unwrap();
96 help: remove the `iter` usages
98 LL - let l = iter.next().unwrap();
101 help: remove the `iter` usages
103 LL - let r = iter.next().unwrap();
107 error: manual implementation of `split_once`
108 --> $DIR/manual_split_once.rs:46:5
110 LL | let mut iter = "a.b.c".splitn(2, '.');
111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112 LL | let l = iter.next()?;
113 | --------------------- first usage here
114 LL | let r = iter.next()?;
115 | --------------------- second usage here
117 help: try `split_once`
119 LL | let (l, r) = "a.b.c".split_once('.')?;
121 help: remove the `iter` usages
123 LL - let l = iter.next()?;
126 help: remove the `iter` usages
128 LL - let r = iter.next()?;
132 error: manual implementation of `rsplit_once`
133 --> $DIR/manual_split_once.rs:50:5
135 LL | let mut iter = "a.b.c".rsplitn(2, '.');
136 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137 LL | let r = iter.next().unwrap();
138 | ----------------------------- first usage here
139 LL | let l = iter.next().unwrap();
140 | ----------------------------- second usage here
142 help: try `rsplit_once`
144 LL | let (l, r) = "a.b.c".rsplit_once('.').unwrap();
146 help: remove the `iter` usages
148 LL - let r = iter.next().unwrap();
151 help: remove the `iter` usages
153 LL - let l = iter.next().unwrap();
157 error: manual implementation of `rsplit_once`
158 --> $DIR/manual_split_once.rs:54:5
160 LL | let mut iter = "a.b.c".rsplitn(2, '.');
161 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
162 LL | let r = iter.next()?;
163 | --------------------- first usage here
164 LL | let l = iter.next()?;
165 | --------------------- second usage here
167 help: try `rsplit_once`
169 LL | let (l, r) = "a.b.c".rsplit_once('.')?;
171 help: remove the `iter` usages
173 LL - let r = iter.next()?;
176 help: remove the `iter` usages
178 LL - let l = iter.next()?;
182 error: manual implementation of `split_once`
183 --> $DIR/manual_split_once.rs:139:13
185 LL | let _ = "key=value".splitn(2, '=').nth(1).unwrap();
186 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `"key=value".split_once('=').unwrap().1`
188 error: manual implementation of `split_once`
189 --> $DIR/manual_split_once.rs:141:5
191 LL | let mut iter = "a.b.c".splitn(2, '.');
192 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
193 LL | let a = iter.next().unwrap();
194 | ----------------------------- first usage here
195 LL | let b = iter.next().unwrap();
196 | ----------------------------- second usage here
198 help: try `split_once`
200 LL | let (a, b) = "a.b.c".split_once('.').unwrap();
202 help: remove the `iter` usages
204 LL - let a = iter.next().unwrap();
207 help: remove the `iter` usages
209 LL - let b = iter.next().unwrap();
213 error: aborting due to 19 previous errors