@@ -56,14 +56,14 @@ pub mod linear {
5656 ( ( capacity as float ) * 3. / 4. ) as uint
5757 }
5858
59- pub fn linear_map_with_capacity < K : Eq Hash , V > (
59+ pub fn linear_map_with_capacity < K : Eq + Hash , V > (
6060 initial_capacity : uint ) -> LinearMap < K , V > {
6161 let r = rand:: task_rng ( ) ;
6262 linear_map_with_capacity_and_keys ( r. gen_u64 ( ) , r. gen_u64 ( ) ,
6363 initial_capacity)
6464 }
6565
66- pure fn linear_map_with_capacity_and_keys < K : Eq Hash , V > (
66+ pure fn linear_map_with_capacity_and_keys < K : Eq + Hash , V > (
6767 k0 : u64 , k1 : u64 ,
6868 initial_capacity : uint ) -> LinearMap < K , V > {
6969 LinearMap {
@@ -74,7 +74,7 @@ pub mod linear {
7474 }
7575 }
7676
77- priv impl < K : Hash IterBytes Eq , V > LinearMap < K , V > {
77+ priv impl < K : Hash + IterBytes + Eq , V > LinearMap < K , V > {
7878 #[ inline( always) ]
7979 pure fn to_bucket ( & self , h : uint ) -> uint {
8080 // A good hash function with entropy spread over all of the
@@ -246,7 +246,7 @@ pub mod linear {
246246 }
247247 }
248248
249- impl<K: Hash IterBytes Eq, V> BaseIter<(&K, &V)> for LinearMap<K, V> {
249+ impl<K:Hash + IterBytes + Eq,V> BaseIter<(&K, &V)> for LinearMap<K, V> {
250250 /// Visit all key-value pairs
251251 pure fn each(&self, blk: fn(&(&self/K, &self/V)) -> bool) {
252252 for uint::range(0, self.buckets.len()) |i| {
@@ -263,15 +263,15 @@ pub mod linear {
263263 }
264264
265265
266- impl<K: Hash IterBytes Eq, V> Container for LinearMap<K, V> {
266+ impl<K:Hash + IterBytes + Eq,V> Container for LinearMap<K, V> {
267267 /// Return the number of elements in the map
268268 pure fn len(&self) -> uint { self.size }
269269
270270 /// Return true if the map contains no elements
271271 pure fn is_empty(&self) -> bool { self.len() == 0 }
272272 }
273273
274- impl<K: Hash IterBytes Eq, V> Mutable for LinearMap<K, V> {
274+ impl<K:Hash + IterBytes + Eq,V> Mutable for LinearMap<K, V> {
275275 /// Clear the map, removing all key-value pairs.
276276 fn clear(&mut self) {
277277 for uint::range(0, self.buckets.len()) |idx| {
@@ -281,7 +281,7 @@ pub mod linear {
281281 }
282282 }
283283
284- impl<K: Hash IterBytes Eq, V> Map<K, V> for LinearMap<K, V> {
284+ impl<K:Hash + IterBytes + Eq,V> Map<K, V> for LinearMap<K, V> {
285285 /// Return true if the map contains a value for the specified key
286286 pure fn contains_key(&self, k: &K) -> bool {
287287 match self.bucket_for_key(k) {
@@ -333,7 +333,7 @@ pub mod linear {
333333 }
334334 }
335335
336- pub impl<K:Hash IterBytes Eq, V> LinearMap<K, V> {
336+ pub impl<K:Hash + IterBytes + Eq,V> LinearMap<K, V> {
337337 /// Create an empty LinearMap
338338 static fn new() -> LinearMap<K, V> {
339339 linear_map_with_capacity(INITIAL_CAPACITY)
@@ -457,7 +457,7 @@ pub mod linear {
457457 }
458458 }
459459
460- impl < K : Hash IterBytes Eq , V : Eq > Eq for LinearMap < K , V > {
460+ impl < K : Hash + IterBytes + Eq , V : Eq > Eq for LinearMap < K , V > {
461461 pure fn eq ( & self , other : & LinearMap < K , V > ) -> bool {
462462 if self . len ( ) != other. len ( ) { return false ; }
463463
@@ -478,13 +478,13 @@ pub mod linear {
478478 priv map: LinearMap < T , ( ) >
479479 }
480480
481- impl < T : Hash IterBytes Eq > BaseIter < T > for LinearSet < T > {
481+ impl < T : Hash + IterBytes + Eq > BaseIter < T > for LinearSet < T > {
482482 /// Visit all values in order
483483 pure fn each ( & self , f : fn ( & T ) -> bool ) { self . map . each_key ( f) }
484484 pure fn size_hint ( & self ) -> Option < uint > { Some ( self . len ( ) ) }
485485 }
486486
487- impl < T : Hash IterBytes Eq > Eq for LinearSet < T > {
487+ impl < T : Hash + IterBytes + Eq > Eq for LinearSet < T > {
488488 pure fn eq ( & self , other : & LinearSet < T > ) -> bool {
489489 self . map == other. map
490490 }
@@ -493,20 +493,20 @@ pub mod linear {
493493 }
494494 }
495495
496- impl < T : Hash IterBytes Eq > Container for LinearSet < T > {
496+ impl < T : Hash + IterBytes + Eq > Container for LinearSet < T > {
497497 /// Return the number of elements in the set
498498 pure fn len ( & self ) -> uint { self . map . len ( ) }
499499
500500 /// Return true if the set contains no elements
501501 pure fn is_empty ( & self ) -> bool { self . map . is_empty ( ) }
502502 }
503503
504- impl < T : Hash IterBytes Eq > Mutable for LinearSet < T > {
504+ impl < T : Hash + IterBytes + Eq > Mutable for LinearSet < T > {
505505 /// Clear the set, removing all values.
506506 fn clear ( & mut self ) { self . map . clear ( ) }
507507 }
508508
509- impl < T : Hash IterBytes Eq > Set < T > for LinearSet < T > {
509+ impl < T : Hash + IterBytes + Eq > Set < T > for LinearSet < T > {
510510 /// Return true if the set contains a value
511511 pure fn contains ( & self , value : & T ) -> bool {
512512 self . map . contains_key ( value)
@@ -575,7 +575,7 @@ pub mod linear {
575575 }
576576 }
577577
578- pub impl < T : Hash IterBytes Eq > LinearSet < T > {
578+ pub impl < T : Hash + IterBytes + Eq > LinearSet < T > {
579579 /// Create an empty LinearSet
580580 static fn new( ) -> LinearSet <T > { LinearSet { map: LinearMap :: new( ) } }
581581
0 commit comments