Skip to content

Commit 8b2e7fc

Browse files
committed
Merge pull request #4614 from thestinger/map
remove the old LinearMap constructor
2 parents 5b64c79 + dbfe21e commit 8b2e7fc

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/libcore/hashmap.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ pub mod linear {
6060
((capacity as float) * 3. / 4.) as uint
6161
}
6262

63-
pub fn LinearMap<K:Eq Hash,V>() -> LinearMap<K,V> {
64-
linear_map_with_capacity(INITIAL_CAPACITY)
65-
}
66-
6763
pub fn linear_map_with_capacity<K:Eq Hash,V>(
6864
initial_capacity: uint) -> LinearMap<K,V> {
6965
let r = rand::Rng();
@@ -351,7 +347,8 @@ pub mod linear {
351347
}
352348
}
353349

354-
impl<K:Hash IterBytes Eq,V> LinearMap<K,V> {
350+
pub impl<K:Hash IterBytes Eq,V> LinearMap<K,V> {
351+
/// Create an empty LinearMap
355352
static fn new() -> LinearMap<K, V> {
356353
linear_map_with_capacity(INITIAL_CAPACITY)
357354
}
@@ -495,7 +492,7 @@ pub mod linear {
495492

496493
pub impl <T: Hash IterBytes Eq> LinearSet<T> {
497494
/// Create an empty LinearSet
498-
static fn new() -> LinearSet<T> { LinearSet{map: LinearMap()} }
495+
static fn new() -> LinearSet<T> { LinearSet{map: LinearMap::new()} }
499496
}
500497
}
501498

src/libstd/workcache.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ impl Context {
259259
static fn new(db: @Mut<Database>,
260260
lg: @Mut<Logger>,
261261
cfg: @json::Object) -> Context {
262-
Context {db: db, logger: lg, cfg: cfg, freshness: LinearMap()}
262+
Context{db: db, logger: lg, cfg: cfg, freshness: LinearMap::new()}
263263
}
264264
265265
fn prep<T:Owned
@@ -270,7 +270,7 @@ impl Context {
270270
blk: fn(@Mut<Prep>)->Work<T>) -> Work<T> {
271271
let p = @Mut(Prep {ctxt: self,
272272
fn_name: fn_name.to_owned(),
273-
declared_inputs: LinearMap()});
273+
declared_inputs: LinearMap::new()});
274274
blk(p)
275275
}
276276
}

0 commit comments

Comments
 (0)