about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/bench.rs (renamed from src/libstd/collections/hashmap/bench.rs)14
-rw-r--r--src/libstd/collections/hash/map.rs (renamed from src/libstd/collections/hashmap/map.rs)0
-rw-r--r--src/libstd/collections/hash/mod.rs (renamed from src/libstd/collections/hashmap/mod.rs)21
-rw-r--r--src/libstd/collections/hash/set.rs (renamed from src/libstd/collections/hashmap/set.rs)2
-rw-r--r--src/libstd/collections/hash/table.rs (renamed from src/libstd/collections/hashmap/table.rs)0
-rw-r--r--src/libstd/collections/mod.rs41
6 files changed, 37 insertions, 41 deletions
diff --git a/src/libstd/collections/hashmap/bench.rs b/src/libstd/collections/hash/bench.rs
index 21bbb38f489..62b93336a34 100644
--- a/src/libstd/collections/hashmap/bench.rs
+++ b/src/libstd/collections/hash/bench.rs
@@ -18,7 +18,7 @@ use iter::{range_inclusive};
 
 #[bench]
 fn new_drop(b : &mut Bencher) {
-    use super::HashMap;
+    use super::map::HashMap;
 
     b.iter(|| {
         let m : HashMap<int, int> = HashMap::new();
@@ -28,7 +28,7 @@ fn new_drop(b : &mut Bencher) {
 
 #[bench]
 fn new_insert_drop(b : &mut Bencher) {
-    use super::HashMap;
+    use super::map::HashMap;
 
     b.iter(|| {
         let mut m = HashMap::new();
@@ -39,7 +39,7 @@ fn new_insert_drop(b : &mut Bencher) {
 
 #[bench]
 fn grow_by_insertion(b: &mut Bencher) {
-    use super::HashMap;
+    use super::map::HashMap;
 
     let mut m = HashMap::new();
 
@@ -57,7 +57,7 @@ fn grow_by_insertion(b: &mut Bencher) {
 
 #[bench]
 fn find_existing(b: &mut Bencher) {
-    use super::HashMap;
+    use super::map::HashMap;
 
     let mut m = HashMap::new();
 
@@ -74,7 +74,7 @@ fn find_existing(b: &mut Bencher) {
 
 #[bench]
 fn find_nonexisting(b: &mut Bencher) {
-    use super::HashMap;
+    use super::map::HashMap;
 
     let mut m = HashMap::new();
 
@@ -91,7 +91,7 @@ fn find_nonexisting(b: &mut Bencher) {
 
 #[bench]
 fn hashmap_as_queue(b: &mut Bencher) {
-    use super::HashMap;
+    use super::map::HashMap;
 
     let mut m = HashMap::new();
 
@@ -110,7 +110,7 @@ fn hashmap_as_queue(b: &mut Bencher) {
 
 #[bench]
 fn find_pop_insert(b: &mut Bencher) {
-    use super::HashMap;
+    use super::map::HashMap;
 
     let mut m = HashMap::new();
 
diff --git a/src/libstd/collections/hashmap/map.rs b/src/libstd/collections/hash/map.rs
index 596e483c2f6..596e483c2f6 100644
--- a/src/libstd/collections/hashmap/map.rs
+++ b/src/libstd/collections/hash/map.rs
diff --git a/src/libstd/collections/hashmap/mod.rs b/src/libstd/collections/hash/mod.rs
index 6508d4609f1..ee3fc1e6ac3 100644
--- a/src/libstd/collections/hashmap/mod.rs
+++ b/src/libstd/collections/hash/mod.rs
@@ -10,24 +10,7 @@
 
 //! Unordered containers, implemented as hash-tables
 
-pub use self::map::HashMap;
-pub use self::map::Entries;
-pub use self::map::MutEntries;
-pub use self::map::MoveEntries;
-pub use self::map::Entry;
-pub use self::map::Occupied;
-pub use self::map::Vacant;
-pub use self::map::OccupiedEntry;
-pub use self::map::VacantEntry;
-pub use self::map::Keys;
-pub use self::map::Values;
-pub use self::map::INITIAL_CAPACITY;
-pub use self::set::HashSet;
-pub use self::set::SetItems;
-pub use self::set::SetMoveItems;
-pub use self::set::SetAlgebraItems;
-
 mod bench;
-mod map;
-mod set;
+pub mod map;
+pub mod set;
 mod table;
diff --git a/src/libstd/collections/hashmap/set.rs b/src/libstd/collections/hash/set.rs
index 69f3812425f..823bd49d7a6 100644
--- a/src/libstd/collections/hashmap/set.rs
+++ b/src/libstd/collections/hash/set.rs
@@ -22,7 +22,7 @@ use iter;
 use option::{Some, None};
 use result::{Ok, Err};
 
-use super::{HashMap, Entries, MoveEntries, INITIAL_CAPACITY};
+use super::map::{HashMap, Entries, MoveEntries, INITIAL_CAPACITY};
 
 
 // Future Optimization (FIXME!)
diff --git a/src/libstd/collections/hashmap/table.rs b/src/libstd/collections/hash/table.rs
index 4d73029b7b0..4d73029b7b0 100644
--- a/src/libstd/collections/hashmap/table.rs
+++ b/src/libstd/collections/hash/table.rs
diff --git a/src/libstd/collections/mod.rs b/src/libstd/collections/mod.rs
index be9e22ee9d1..13486d4b8f8 100644
--- a/src/libstd/collections/mod.rs
+++ b/src/libstd/collections/mod.rs
@@ -24,9 +24,9 @@
 //! Rust's collections can be grouped into four major categories:
 //!
 //! * Sequences: `Vec`, `RingBuf`, `DList`, `BitV`
-//! * Maps: `HashMap`, `BTreeMap`, `TreeMap`, `TrieMap`, `SmallIntMap`, `LruCache`
+//! * Maps: `HashMap`, `BTreeMap`, `TreeMap`, `TrieMap`, `VecMap`, `LruCache`
 //! * Sets: `HashSet`, `BTreeSet`, `TreeSet`, `TrieSet`, `BitVSet`, `EnumSet`
-//! * Misc: `PriorityQueue`
+//! * Misc: `BinaryHeap`
 //!
 //! # When Should You Use Which Collection?
 //!
@@ -74,7 +74,7 @@
 //! * You want a `HashMap`, but with many potentially large `uint` keys.
 //! * You want a `BTreeMap`, but with potentially large `uint` keys.
 //!
-//! ### Use a `SmallIntMap` when:
+//! ### Use a `VecMap` when:
 //! * You want a `HashMap` but with known to be small `uint` keys.
 //! * You want a `BTreeMap`, but with known to be small `uint` keys.
 //!
@@ -88,12 +88,12 @@
 //! * You want a bitvector.
 //!
 //! ### Use a `BitVSet` when:
-//! * You want a `SmallIntSet`.
+//! * You want a `VecSet`.
 //!
 //! ### Use an `EnumSet` when:
 //! * You want a C-like enum, stored in a single `uint`.
 //!
-//! ### Use a `PriorityQueue` when:
+//! ### Use a `BinaryHeap` when:
 //! * You want to store a bunch of elements, but only ever want to process the "biggest"
 //! or "most important" one at any given time.
 //! * You want a priority queue.
@@ -266,7 +266,7 @@
 //! #### Counting the number of times each character in a string occurs
 //!
 //! ```
-//! use std::collections::btree::{BTreeMap, Occupied, Vacant};
+//! use std::collections::btree_map::{BTreeMap, Occupied, Vacant};
 //!
 //! let mut count = BTreeMap::new();
 //! let message = "she sells sea shells by the sea shore";
@@ -293,7 +293,7 @@
 //! #### Tracking the inebriation of customers at a bar
 //!
 //! ```
-//! use std::collections::btree::{BTreeMap, Occupied, Vacant};
+//! use std::collections::btree_map::{BTreeMap, Occupied, Vacant};
 //!
 //! // A client of the bar. They have an id and a blood alcohol level.
 //! struct Person { id: u32, blood_alcohol: f32 };
@@ -328,14 +328,27 @@
 
 #![experimental]
 
-pub use core_collections::{Bitv, BitvSet, BTreeMap, BTreeSet, DList, EnumSet};
-pub use core_collections::{PriorityQueue, RingBuf, SmallIntMap};
-pub use core_collections::{TreeMap, TreeSet, TrieMap, TrieSet};
-pub use core_collections::{bitv, btree, dlist, enum_set};
-pub use core_collections::{priority_queue, ringbuf, smallintmap, treemap, trie};
+pub use core_collections::{BinaryHeap, Bitv, BitvSet, BTreeMap, BTreeSet};
+pub use core_collections::{DList, EnumSet, RingBuf};
+pub use core_collections::{TreeMap, TreeSet, TrieMap, TrieSet, VecMap};
 
-pub use self::hashmap::{HashMap, HashSet};
+pub use core_collections::{binary_heap, bitv, bitv_set, btree_map, btree_set, dlist, enum_set};
+pub use core_collections::{ring_buf, tree_map, tree_set, trie_map, trie_set, vec_map};
+
+pub use self::hash_map::HashMap;
+pub use self::hash_set::HashSet;
 pub use self::lru_cache::LruCache;
 
-pub mod hashmap;
+mod hash;
+
+pub mod hash_map {
+    //! A hashmap
+    pub use super::hash::map::*;
+}
+
+pub mod hash_set {
+    //! A hashset
+    pub use super::hash::set::*;
+}
+
 pub mod lru_cache;