Skip to content

remove the old LinearMap constructor #4614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 24, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/libcore/hashmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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()} }
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/libstd/workcache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
}
Expand Down