File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,6 @@ pub mod linear {
60
60
( ( capacity as float ) * 3. / 4. ) as uint
61
61
}
62
62
63
- pub fn LinearMap < K : Eq Hash , V > ( ) -> LinearMap < K , V > {
64
- linear_map_with_capacity ( INITIAL_CAPACITY )
65
- }
66
-
67
63
pub fn linear_map_with_capacity < K : Eq Hash , V > (
68
64
initial_capacity : uint ) -> LinearMap < K , V > {
69
65
let r = rand:: Rng ( ) ;
@@ -351,7 +347,8 @@ pub mod linear {
351
347
}
352
348
}
353
349
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
355
352
static fn new( ) -> LinearMap <K , V > {
356
353
linear_map_with_capacity( INITIAL_CAPACITY )
357
354
}
@@ -495,7 +492,7 @@ pub mod linear {
495
492
496
493
pub impl < T : Hash IterBytes Eq > LinearSet < T > {
497
494
/// Create an empty LinearSet
498
- static fn new( ) -> LinearSet <T > { LinearSet { map: LinearMap ( ) } }
495
+ static fn new( ) -> LinearSet <T > { LinearSet { map: LinearMap :: new ( ) } }
499
496
}
500
497
}
501
498
Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ impl Context {
259
259
static fn new(db: @Mut<Database>,
260
260
lg: @Mut<Logger>,
261
261
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 ()}
263
263
}
264
264
265
265
fn prep<T:Owned
@@ -270,7 +270,7 @@ impl Context {
270
270
blk: fn(@Mut<Prep>)->Work<T>) -> Work<T> {
271
271
let p = @Mut(Prep {ctxt: self,
272
272
fn_name: fn_name.to_owned(),
273
- declared_inputs: LinearMap()});
273
+ declared_inputs: LinearMap::new ()});
274
274
blk(p)
275
275
}
276
276
}
You can’t perform that action at this time.
0 commit comments