1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
error: unnecessary use of `splitn`
--> $DIR/needless_splitn.rs:14:13
|
LL | let _ = str.splitn(2, '=').next();
| ^^^^^^^^^^^^^^^^^^ help: try this: `str.split('=')`
|
= note: `-D clippy::needless-splitn` implied by `-D warnings`
error: unnecessary use of `splitn`
--> $DIR/needless_splitn.rs:15:13
|
LL | let _ = str.splitn(2, '=').nth(0);
| ^^^^^^^^^^^^^^^^^^ help: try this: `str.split('=')`
error: unnecessary use of `splitn`
--> $DIR/needless_splitn.rs:18:18
|
LL | let (_, _) = str.splitn(3, '=').next_tuple().unwrap();
| ^^^^^^^^^^^^^^^^^^ help: try this: `str.split('=')`
error: unnecessary use of `rsplitn`
--> $DIR/needless_splitn.rs:21:13
|
LL | let _ = str.rsplitn(2, '=').next();
| ^^^^^^^^^^^^^^^^^^^ help: try this: `str.rsplit('=')`
error: unnecessary use of `rsplitn`
--> $DIR/needless_splitn.rs:22:13
|
LL | let _ = str.rsplitn(2, '=').nth(0);
| ^^^^^^^^^^^^^^^^^^^ help: try this: `str.rsplit('=')`
error: unnecessary use of `rsplitn`
--> $DIR/needless_splitn.rs:25:18
|
LL | let (_, _) = str.rsplitn(3, '=').next_tuple().unwrap();
| ^^^^^^^^^^^^^^^^^^^ help: try this: `str.rsplit('=')`
error: unnecessary use of `splitn`
--> $DIR/needless_splitn.rs:27:13
|
LL | let _ = str.splitn(5, '=').next();
| ^^^^^^^^^^^^^^^^^^ help: try this: `str.split('=')`
error: unnecessary use of `splitn`
--> $DIR/needless_splitn.rs:28:13
|
LL | let _ = str.splitn(5, '=').nth(3);
| ^^^^^^^^^^^^^^^^^^ help: try this: `str.split('=')`
error: unnecessary use of `splitn`
--> $DIR/needless_splitn.rs:34:13
|
LL | let _ = s.splitn(2, '=').next()?;
| ^^^^^^^^^^^^^^^^ help: try this: `s.split('=')`
error: unnecessary use of `splitn`
--> $DIR/needless_splitn.rs:35:13
|
LL | let _ = s.splitn(2, '=').nth(0)?;
| ^^^^^^^^^^^^^^^^ help: try this: `s.split('=')`
error: unnecessary use of `rsplitn`
--> $DIR/needless_splitn.rs:36:13
|
LL | let _ = s.rsplitn(2, '=').next()?;
| ^^^^^^^^^^^^^^^^^ help: try this: `s.rsplit('=')`
error: unnecessary use of `rsplitn`
--> $DIR/needless_splitn.rs:37:13
|
LL | let _ = s.rsplitn(2, '=').nth(0)?;
| ^^^^^^^^^^^^^^^^^ help: try this: `s.rsplit('=')`
error: unnecessary use of `splitn`
--> $DIR/needless_splitn.rs:45:13
|
LL | let _ = "key=value".splitn(2, '=').nth(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `"key=value".split('=')`
error: aborting due to 13 previous errors
|