1
- error: using `str.trim().split()` with hard-coded newlines is not portable
1
+ error: using `str.trim().split()` with hard-coded newlines
2
2
--> $DIR/str_split.rs:59:13
3
3
|
4
4
LL | let _ = s1.trim().split('\n');
@@ -7,77 +7,59 @@ LL | let _ = s1.trim().split('\n');
7
7
= note: `-D clippy::str-split-at-newline` implied by `-D warnings`
8
8
= help: to override `-D warnings` add `#[allow(clippy::str_split_at_newline)]`
9
9
10
- error: using `str.trim().split()` with hard-coded newlines is not portable
10
+ error: using `str.trim().split()` with hard-coded newlines
11
11
--> $DIR/str_split.rs:61:13
12
12
|
13
13
LL | let _ = s1.trim().split("\n");
14
14
| ^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `s1.lines()`
15
15
16
- error: using `str.trim().split()` with hard-coded newlines is not portable
16
+ error: using `str.trim().split()` with hard-coded newlines
17
17
--> $DIR/str_split.rs:62:13
18
18
|
19
19
LL | let _ = s1.trim().split("\r\n");
20
20
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `s1.lines()`
21
21
22
- error: using `str.trim().split()` with hard-coded newlines is not portable
22
+ error: using `str.trim().split()` with hard-coded newlines
23
23
--> $DIR/str_split.rs:65:13
24
24
|
25
- LL | let _ = "hello\nworld\n".trim().split('\n');
26
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `"hello\nworld\n".lines()`
27
-
28
- error: using `str.trim().split()` with hard-coded newlines is not portable
29
- --> $DIR/str_split.rs:67:13
30
- |
31
- LL | let _ = "hello\nworld\n".trim().split("\n");
32
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `"hello\nworld\n".lines()`
33
-
34
- error: using `str.trim().split()` with hard-coded newlines is not portable
35
- --> $DIR/str_split.rs:68:13
36
- |
37
- LL | let _ = "hello\nworld\n".trim().split("\r\n");
38
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `"hello\nworld\n".lines()`
39
-
40
- error: using `str.trim().split()` with hard-coded newlines is not portable
41
- --> $DIR/str_split.rs:71:13
42
- |
43
25
LL | let _ = s2.trim().split('\n');
44
26
| ^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `s2.lines()`
45
27
46
- error: using `str.trim().split()` with hard-coded newlines is not portable
47
- --> $DIR/str_split.rs:73 :13
28
+ error: using `str.trim().split()` with hard-coded newlines
29
+ --> $DIR/str_split.rs:67 :13
48
30
|
49
31
LL | let _ = s2.trim().split("\n");
50
32
| ^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `s2.lines()`
51
33
52
- error: using `str.trim().split()` with hard-coded newlines is not portable
53
- --> $DIR/str_split.rs:74 :13
34
+ error: using `str.trim().split()` with hard-coded newlines
35
+ --> $DIR/str_split.rs:68 :13
54
36
|
55
37
LL | let _ = s2.trim().split("\r\n");
56
38
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `s2.lines()`
57
39
58
- error: using `str.trim().split()` with hard-coded newlines is not portable
59
- --> $DIR/str_split.rs:78 :13
40
+ error: using `str.trim().split()` with hard-coded newlines
41
+ --> $DIR/str_split.rs:72 :13
60
42
|
61
43
LL | let _ = s3.trim().split('\n');
62
44
| ^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `s3.lines()`
63
45
64
- error: using `str.trim().split()` with hard-coded newlines is not portable
65
- --> $DIR/str_split.rs:80 :13
46
+ error: using `str.trim().split()` with hard-coded newlines
47
+ --> $DIR/str_split.rs:74 :13
66
48
|
67
49
LL | let _ = s3.trim().split("\n");
68
50
| ^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `s3.lines()`
69
51
70
- error: using `str.trim().split()` with hard-coded newlines is not portable
71
- --> $DIR/str_split.rs:81 :13
52
+ error: using `str.trim().split()` with hard-coded newlines
53
+ --> $DIR/str_split.rs:75 :13
72
54
|
73
55
LL | let _ = s3.trim().split("\r\n");
74
56
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `s3.lines()`
75
57
76
- error: using `str.trim().split()` with hard-coded newlines is not portable
77
- --> $DIR/str_split.rs:84 :13
58
+ error: using `str.trim().split()` with hard-coded newlines
59
+ --> $DIR/str_split.rs:78 :13
78
60
|
79
- LL | let _ = make_str!().trim().split('\n');
80
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `make_str!().lines()`
61
+ LL | let _ = make_str!(s1 ).trim().split('\n');
62
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `str.lines()` instead: `make_str!(s1 ).lines()`
81
63
82
- error: aborting due to 13 previous errors
64
+ error: aborting due to 10 previous errors
83
65
0 commit comments