diff options
Diffstat (limited to 'src/docs/bytes_count_to_len.txt')
| -rw-r--r-- | src/docs/bytes_count_to_len.txt | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/docs/bytes_count_to_len.txt b/src/docs/bytes_count_to_len.txt deleted file mode 100644 index ca7bf9a38da..00000000000 --- a/src/docs/bytes_count_to_len.txt +++ /dev/null @@ -1,18 +0,0 @@ -### What it does -It checks for `str::bytes().count()` and suggests replacing it with -`str::len()`. - -### Why is this bad? -`str::bytes().count()` is longer and may not be as performant as using -`str::len()`. - -### Example -``` -"hello".bytes().count(); -String::from("hello").bytes().count(); -``` -Use instead: -``` -"hello".len(); -String::from("hello").len(); -``` \ No newline at end of file |
