about summary refs log tree commit diff
path: root/src/docs/unit_hash.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/docs/unit_hash.txt')
-rw-r--r--src/docs/unit_hash.txt20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/docs/unit_hash.txt b/src/docs/unit_hash.txt
deleted file mode 100644
index a22d2994602..00000000000
--- a/src/docs/unit_hash.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-### What it does
-Detects `().hash(_)`.
-
-### Why is this bad?
-Hashing a unit value doesn't do anything as the implementation of `Hash` for `()` is a no-op.
-
-### Example
-```
-match my_enum {
-	Empty => ().hash(&mut state),
-	WithValue(x) => x.hash(&mut state),
-}
-```
-Use instead:
-```
-match my_enum {
-	Empty => 0_u8.hash(&mut state),
-	WithValue(x) => x.hash(&mut state),
-}
-```
\ No newline at end of file