about summary refs log tree commit diff
diff options
context:
space:
mode:
authorpierwill <pierwill@users.noreply.github.com>2021-10-01 13:17:50 -0500
committerpierwill <pierwill@users.noreply.github.com>2021-10-01 13:18:06 -0500
commit2a5dcd58909d5f7c58e3845eb926ed118c87cfb0 (patch)
tree0cddc33821492a14d5cf4f8e7aee95c9d4b9dc8a
parentf531b8122ebd7b07a50198b14727337763d05707 (diff)
downloadrust-2a5dcd58909d5f7c58e3845eb926ed118c87cfb0.tar.gz
rust-2a5dcd58909d5f7c58e3845eb926ed118c87cfb0.zip
fix: edit description of "prefix-free"
-rw-r--r--library/core/src/hash/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/core/src/hash/mod.rs b/library/core/src/hash/mod.rs
index 83cb85843b6..024dbfef808 100644
--- a/library/core/src/hash/mod.rs
+++ b/library/core/src/hash/mod.rs
@@ -156,8 +156,10 @@ mod sip;
 /// ## Prefix collisions
 ///
 /// Implementations of `hash` should ensure that the data they
-/// pass to the `Hasher` are prefix-free. That is, different concatenations
-/// of the same data should not produce the same output.
+/// pass to the `Hasher` are prefix-free. That is,
+/// unequal values should cause two different byte sequences to be written,
+/// and neither of the two sequences should be a prefix of the other.
+///
 /// For example, the standard implementation of [`Hash` for `&str`][impl] passes an extra
 /// `0xFF` byte to the `Hasher` so that the values `("ab", "c")` and `("a",
 /// "bc")` hash differently.