@@ -185,7 +185,7 @@ pub mod linear {
185
185
}
186
186
187
187
#[ inline( always) ]
188
- pure fn value_for_bucket ( & self , idx : uint ) -> & self / V {
188
+ pure fn value_for_bucket ( & self , idx : uint ) -> & ' self V {
189
189
match self . buckets [ idx] {
190
190
Some ( ref bkt) => & bkt. value ,
191
191
None => fail ! ( ~"LinearMap :: find: internal logic error"),
@@ -270,10 +270,10 @@ pub mod linear {
270
270
}
271
271
272
272
impl<K:Hash + IterBytes + Eq,V>
273
- BaseIter<(&self/ K, &self/ V)> for LinearMap<K, V>
273
+ BaseIter<(&' self K, &' self V)> for LinearMap<K, V>
274
274
{
275
275
/// Visit all key-value pairs
276
- pure fn each(&self, blk: &fn(&(&self/ K, &self/ V)) -> bool) {
276
+ pure fn each(&self, blk: &fn(&(&' self K, &' self V)) -> bool) {
277
277
for uint::range(0, self.buckets.len()) |i| {
278
278
let mut broke = false;
279
279
do self.buckets[i].map |bucket| {
@@ -339,7 +339,7 @@ pub mod linear {
339
339
}
340
340
341
341
/// Return the value corresponding to the key in the map
342
- pure fn find(&self, k: &K) -> Option<&self/ V> {
342
+ pure fn find(&self, k: &K) -> Option<&' self V> {
343
343
match self.bucket_for_key(k) {
344
344
FoundEntry(idx) => Some(self.value_for_bucket(idx)),
345
345
TableFull | FoundHole(_) => None,
@@ -412,7 +412,7 @@ pub mod linear {
412
412
413
413
/// Return the value corresponding to the key in the map, or insert
414
414
/// and return the value if it doesn't exist.
415
- fn find_or_insert(&mut self, k: K, v: V) -> &self/ V {
415
+ fn find_or_insert(&mut self, k: K, v: V) -> &' self V {
416
416
if self.size >= self.resize_at {
417
417
// n.b.: We could also do this after searching, so
418
418
// that we do not resize if this call to insert is
@@ -442,7 +442,7 @@ pub mod linear {
442
442
443
443
/// Return the value corresponding to the key in the map, or create,
444
444
/// insert, and return a new value if it doesn't exist.
445
- fn find_or_insert_with(&mut self, k: K, f: &fn(&K) -> V) -> &self/ V {
445
+ fn find_or_insert_with(&mut self, k: K, f: &fn(&K) -> V) -> &' self V {
446
446
if self.size >= self.resize_at {
447
447
// n.b.: We could also do this after searching, so
448
448
// that we do not resize if this call to insert is
@@ -487,7 +487,7 @@ pub mod linear {
487
487
}
488
488
}
489
489
490
- pure fn get(&self, k: &K) -> &self/ V {
490
+ pure fn get(&self, k: &K) -> &' self V {
491
491
match self.find(k) {
492
492
Some(v) => v,
493
493
None => fail!(fmt!(" No entry found for key: %?" , k) ) ,
@@ -509,7 +509,7 @@ pub mod linear {
509
509
/// Return the value corresponding to the key in the map, using
510
510
/// equivalence
511
511
pure fn find_equiv < Q : Hash + IterBytes + Equiv < K > > ( & self , k : & Q )
512
- -> Option < & self / V > {
512
+ -> Option < & ' self V > {
513
513
match self . bucket_for_key_equiv ( k) {
514
514
FoundEntry ( idx) => Some ( self . value_for_bucket ( idx) ) ,
515
515
TableFull | FoundHole ( _) => None ,
0 commit comments