diff options
| author | blake2-ppc <blake2-ppc> | 2013-08-15 05:23:33 +0200 |
|---|---|---|
| committer | blake2-ppc <blake2-ppc> | 2013-08-18 18:39:47 +0200 |
| commit | 6066118b2988fee1b758d542cee18ffe7a84acab (patch) | |
| tree | aa5fadca63d12e8298653a9bc9f8186b7ac2778a /src/rustllvm/PassWrapper.cpp | |
| parent | 0a238288d343fc6323b37aad8678b3ea701fb7e3 (diff) | |
| download | rust-6066118b2988fee1b758d542cee18ffe7a84acab.tar.gz rust-6066118b2988fee1b758d542cee18ffe7a84acab.zip | |
std::to_bytes: Delimit sequences &[A] and ~str when hashing
Address issue #5257, for example these values all had the same hash value:
("aaa", "bbb", "ccc")
("aaab", "bb", "ccc")
("aaabbb", "", "ccc")
IterBytes for &[A] now includes the length, before calling iter_bytes on
each element.
IterBytes for &str is now terminated by a byte that does not appear in
UTF-8. This way only one more byte is processed when hashing strings.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
