about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2013-01-24 11:07:39 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-01-24 11:07:39 -0800
commit8b2e7fc529526e24779e5cabd0c3b1a90e1da245 (patch)
tree8fd5ecd092ad79fc372bd43c0ac6830203ed65be
parent5b64c796a441a32f6661bef7783637c6d2a3e169 (diff)
parentdbfe21eddaec165e689b90e86a049ef654d35287 (diff)
downloadrust-8b2e7fc529526e24779e5cabd0c3b1a90e1da245.tar.gz
rust-8b2e7fc529526e24779e5cabd0c3b1a90e1da245.zip
Merge pull request #4614 from thestinger/map
remove the old LinearMap constructor
-rw-r--r--src/libcore/hashmap.rs9
-rw-r--r--src/libstd/workcache.rs4
2 files changed, 5 insertions, 8 deletions
diff --git a/src/libcore/hashmap.rs b/src/libcore/hashmap.rs
index 40b80bddf84..0d4119e1a1b 100644
--- a/src/libcore/hashmap.rs
+++ b/src/libcore/hashmap.rs
@@ -60,10 +60,6 @@ pub mod linear {
         ((capacity as float) * 3. / 4.) as uint
     }
 
-    pub fn LinearMap<K:Eq Hash,V>() -> LinearMap<K,V> {
-        linear_map_with_capacity(INITIAL_CAPACITY)
-    }
-
     pub fn linear_map_with_capacity<K:Eq Hash,V>(
         initial_capacity: uint) -> LinearMap<K,V> {
         let r = rand::Rng();
@@ -351,7 +347,8 @@ pub mod linear {
         }
     }
 
-    impl<K:Hash IterBytes Eq,V> LinearMap<K,V> {
+    pub impl<K:Hash IterBytes Eq,V> LinearMap<K,V> {
+        /// Create an empty LinearMap
         static fn new() -> LinearMap<K, V> {
             linear_map_with_capacity(INITIAL_CAPACITY)
         }
@@ -495,7 +492,7 @@ pub mod linear {
 
     pub impl <T: Hash IterBytes Eq> LinearSet<T> {
         /// Create an empty LinearSet
-        static fn new() -> LinearSet<T> { LinearSet{map: LinearMap()} }
+        static fn new() -> LinearSet<T> { LinearSet{map: LinearMap::new()} }
     }
 }
 
diff --git a/src/libstd/workcache.rs b/src/libstd/workcache.rs
index 9572c07e715..fbd695aee76 100644
--- a/src/libstd/workcache.rs
+++ b/src/libstd/workcache.rs
@@ -259,7 +259,7 @@ impl Context {
     static fn new(db: @Mut<Database>,
                   lg: @Mut<Logger>,
                   cfg: @json::Object) -> Context {
-        Context {db: db, logger: lg, cfg: cfg, freshness: LinearMap()}
+        Context{db: db, logger: lg, cfg: cfg, freshness: LinearMap::new()}
     }
 
     fn prep<T:Owned
@@ -270,7 +270,7 @@ impl Context {
                   blk: fn(@Mut<Prep>)->Work<T>) -> Work<T> {
         let p = @Mut(Prep {ctxt: self,
                            fn_name: fn_name.to_owned(),
-                           declared_inputs: LinearMap()});
+                           declared_inputs: LinearMap::new()});
         blk(p)
     }
 }