Skip to content

Commit 72d24f7

Browse files
committed
delete :
1 parent 3f0ce06 commit 72d24f7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

clippy_lints/src/bytes_count_to_len.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl<'tcx> LateLintPass<'tcx> for BytesCountToLen {
5757
BYTES_COUNT_TO_LEN,
5858
expr.span,
5959
"using long and hard to read `.bytes().count()`",
60-
"consider calling `.len` instead:",
60+
"consider calling `.len` instead",
6161
format!("{}.len()", snippet_with_applicability(cx, str_expr.span, "..", &mut applicability)),
6262
applicability
6363
);

tests/ui/bytes_count_to_len.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ error: using long and hard to read `.bytes().count()`
22
--> $DIR/bytes_count_to_len.rs:8:13
33
|
44
LL | let _ = String::from("foo").bytes().count();
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.len` instead:: `String::from("foo").len()`
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.len` instead: `String::from("foo").len()`
66
|
77
= note: `-D clippy::bytes-count-to-len` implied by `-D warnings`
88

99
error: using long and hard to read `.bytes().count()`
1010
--> $DIR/bytes_count_to_len.rs:11:13
1111
|
1212
LL | let _ = s1.bytes().count();
13-
| ^^^^^^^^^^^^^^^^^^ help: consider calling `.len` instead:: `s1.len()`
13+
| ^^^^^^^^^^^^^^^^^^ help: consider calling `.len` instead: `s1.len()`
1414

1515
error: using long and hard to read `.bytes().count()`
1616
--> $DIR/bytes_count_to_len.rs:14:13
1717
|
1818
LL | let _ = "foo".bytes().count();
19-
| ^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.len` instead:: `"foo".len()`
19+
| ^^^^^^^^^^^^^^^^^^^^^ help: consider calling `.len` instead: `"foo".len()`
2020

2121
error: using long and hard to read `.bytes().count()`
2222
--> $DIR/bytes_count_to_len.rs:17:13
2323
|
2424
LL | let _ = s2.bytes().count();
25-
| ^^^^^^^^^^^^^^^^^^ help: consider calling `.len` instead:: `s2.len()`
25+
| ^^^^^^^^^^^^^^^^^^ help: consider calling `.len` instead: `s2.len()`
2626

2727
error: aborting due to 4 previous errors
2828

0 commit comments

Comments
 (0)