From 2a5dcd58909d5f7c58e3845eb926ed118c87cfb0 Mon Sep 17 00:00:00 2001 From: pierwill Date: Fri, 1 Oct 2021 13:17:50 -0500 Subject: [PATCH] fix: edit description of "prefix-free" --- library/core/src/hash/mod.rs | 6 ++++-- 1 file 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.