]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/bytes_count_to_len.stderr
Auto merge of #101969 - reez12g:issue-101306, r=reez12g
[rust.git] / src / tools / clippy / tests / ui / bytes_count_to_len.stderr
1 error: using long and hard to read `.bytes().count()`
2   --> $DIR/bytes_count_to_len.rs:8:13
3    |
4 LL |     let _ = String::from("foo").bytes().count();
5    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.len()` instead: `String::from("foo").len()`
6    |
7    = note: `-D clippy::bytes-count-to-len` implied by `-D warnings`
8
9 error: using long and hard to read `.bytes().count()`
10   --> $DIR/bytes_count_to_len.rs:11:13
11    |
12 LL |     let _ = s1.bytes().count();
13    |             ^^^^^^^^^^^^^^^^^^ help: consider calling `.len()` instead: `s1.len()`
14
15 error: using long and hard to read `.bytes().count()`
16   --> $DIR/bytes_count_to_len.rs:14:13
17    |
18 LL |     let _ = "foo".bytes().count();
19    |             ^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.len()` instead: `"foo".len()`
20
21 error: using long and hard to read `.bytes().count()`
22   --> $DIR/bytes_count_to_len.rs:17:13
23    |
24 LL |     let _ = s2.bytes().count();
25    |             ^^^^^^^^^^^^^^^^^^ help: consider calling `.len()` instead: `s2.len()`
26
27 error: aborting due to 4 previous errors
28