Skip to content

Commit 2a5dcd5

Browse files
committed
fix: edit description of "prefix-free"
1 parent f531b81 commit 2a5dcd5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/core/src/hash/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ mod sip;
156156
/// ## Prefix collisions
157157
///
158158
/// Implementations of `hash` should ensure that the data they
159-
/// pass to the `Hasher` are prefix-free. That is, different concatenations
160-
/// of the same data should not produce the same output.
159+
/// pass to the `Hasher` are prefix-free. That is,
160+
/// unequal values should cause two different byte sequences to be written,
161+
/// and neither of the two sequences should be a prefix of the other.
162+
///
161163
/// For example, the standard implementation of [`Hash` for `&str`][impl] passes an extra
162164
/// `0xFF` byte to the `Hasher` so that the values `("ab", "c")` and `("a",
163165
/// "bc")` hash differently.

0 commit comments

Comments
 (0)