From acde90dc1c5d13ccfd24703bddc1e2df4a52ae58 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 24 Jan 2013 11:47:00 -0500 Subject: [PATCH] remove old LinearMap constructor --- src/libcore/hashmap.rs | 8 ++------ src/libstd/workcache.rs | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/libcore/hashmap.rs b/src/libcore/hashmap.rs index 40b80bddf84..2d3eb4de4d4 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() -> LinearMap { - linear_map_with_capacity(INITIAL_CAPACITY) - } - pub fn linear_map_with_capacity( initial_capacity: uint) -> LinearMap { let r = rand::Rng(); @@ -351,7 +347,7 @@ pub mod linear { } } - impl LinearMap { + pub impl LinearMap { static fn new() -> LinearMap { linear_map_with_capacity(INITIAL_CAPACITY) } @@ -495,7 +491,7 @@ pub mod linear { pub impl LinearSet { /// Create an empty LinearSet - static fn new() -> LinearSet { LinearSet{map: LinearMap()} } + static fn new() -> LinearSet { 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, lg: @Mut, 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)->Work) -> Work { let p = @Mut(Prep {ctxt: self, fn_name: fn_name.to_owned(), - declared_inputs: LinearMap()}); + declared_inputs: LinearMap::new()}); blk(p) } }