This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 3eb8d2d
committed
Auto merge of rust-lang#134134 - purplesyringa:hash-str-with-length-prefix, r=<try>
Use length prefix in default `Hasher::write_str`
Using a 0xFF trailer is only correct for bytewise hashes. A generic `Hasher` is not necessarily bytewise, so use a length prefix in the default implementation instead.
Context: https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/collision-free.20non-bytewise.20hashers.20on.20stable
r? saethlin1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| 552 | + | |
552 | 553 | | |
553 | | - | |
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
| |||
0 commit comments