]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #15257 : erickt/rust/hashmap, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 2 Jul 2014 07:31:41 +0000 (07:31 +0000)
committerbors <bors@rust-lang.org>
Wed, 2 Jul 2014 07:31:41 +0000 (07:31 +0000)
While `HashMap::new` and `HashMap::with_capacity` were being initialized with a random `SipHasher`, it turns out that `HashMap::from_iter` was just using the default instance of `SipHasher`, which wasn't randomized. This closes that bug, and also inlines some important methods.

1  2 
src/libstd/lib.rs

diff --combined src/libstd/lib.rs
index 48ccd1aa22ce3be3b18f6d517b8816aec688f4b2,12ad1d64344b10ccc73bae8b1d75017020d4fab1..06a1d069b6a72b25f9a75eae9c489a88b8545bd4
@@@ -95,7 -95,6 +95,7 @@@
  //! and `format!`, also available to all Rust code.
  
  #![crate_id = "std#0.11.0-pre"]
 +#![unstable]
  #![comment = "The Rust standard library"]
  #![license = "MIT/ASL2"]
  #![crate_type = "rlib"]
@@@ -167,7 -166,6 +167,6 @@@ pub use core::option
  pub use alloc::owned;
  pub use alloc::rc;
  
- pub use core_collections::hash;
  pub use core_collections::slice;
  pub use core_collections::str;
  pub use core_collections::string;
@@@ -237,6 -235,7 +236,7 @@@ pub mod to_str
  /* Common data structures */
  
  pub mod collections;
+ pub mod hash;
  
  /* Tasks and communication */