summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/len_without_is_empty.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/src/docs/len_without_is_empty.txt')
-rw-r--r--src/tools/clippy/src/docs/len_without_is_empty.txt19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/tools/clippy/src/docs/len_without_is_empty.txt b/src/tools/clippy/src/docs/len_without_is_empty.txt
deleted file mode 100644
index 47a2e8575..000000000
--- a/src/tools/clippy/src/docs/len_without_is_empty.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-### What it does
-Checks for items that implement `.len()` but not
-`.is_empty()`.
-
-### Why is this bad?
-It is good custom to have both methods, because for
-some data structures, asking about the length will be a costly operation,
-whereas `.is_empty()` can usually answer in constant time. Also it used to
-lead to false positives on the [`len_zero`](#len_zero) lint – currently that
-lint will ignore such entities.
-
-### Example
-```
-impl X {
- pub fn len(&self) -> usize {
- ..
- }
-}
-``` \ No newline at end of file