diff options
| author | bors <bors@rust-lang.org> | 2016-08-10 10:03:08 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-10 10:03:08 -0700 |
| commit | 1f2ae3849cf024457253be745ff514a403e90b44 (patch) | |
| tree | bd176e928c727529bba390a542984c7c8170107c /src/libstd | |
| parent | ae774103501337ed63b42b673c6c4fdbf369e80e (diff) | |
| parent | fb1c6acc81c3dfb9b4ae3b9747f24d503658c23f (diff) | |
| download | rust-1f2ae3849cf024457253be745ff514a403e90b44.tar.gz rust-1f2ae3849cf024457253be745ff514a403e90b44.zip | |
Auto merge of #35525 - jonathandturner:rollup, r=jonathandturner
Rollup of 15 pull requests - Successful merges: #35371, #35396, #35446, #35449, #35452, #35458, #35465, #35466, #35470, #35475, #35477, #35484, #35504, #35507, #35524 - Failed merges: #35395, #35415
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index fd7b0a2e6bb..8039421ae77 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -199,13 +199,12 @@ fn test_resize_policy() { /// A hash map implementation which uses linear probing with Robin /// Hood bucket stealing. /// -/// The hashes are all keyed by the thread-local random number generator -/// on creation by default. This means that the ordering of the keys is -/// randomized, but makes the tables more resistant to -/// denial-of-service attacks (Hash DoS). No guarantees are made to the -/// quality of the random data. The implementation uses the best available -/// random data from your platform at the time of creation. This behavior -/// can be overridden with one of the constructors. +/// By default, HashMap uses a somewhat slow hashing algorithm which can provide resistance +/// to DoS attacks. Rust makes a best attempt at acquiring random numbers without IO +/// blocking from your system. Because of this HashMap is not guaranteed to provide +/// DoS resistance since the numbers generated might not be truly random. If you do +/// require this behavior you can create your own hashing function using +/// [BuildHasherDefault](../hash/struct.BuildHasherDefault.html). /// /// It is required that the keys implement the `Eq` and `Hash` traits, although /// this can frequently be achieved by using `#[derive(PartialEq, Eq, Hash)]`. |
