@@ -452,7 +452,7 @@ impl<V> Index<uint, V> for SmallIntMap<V> {
452452}*/
453453
454454macro_rules! iterator {
455- ( impl $name: ident -> $elem: ty, $getter: ident) => {
455+ ( impl $name: ident -> $elem: ty, $( $ getter: ident) ,+ ) => {
456456 impl <' a, T > Iterator <$elem> for $name<' a, T > {
457457 #[ inline]
458458 fn next( & mut self ) -> Option <$elem> {
@@ -462,7 +462,7 @@ macro_rules! iterator {
462462 if elem. is_some( ) {
463463 let index = self . front;
464464 self . front += 1 ;
465- return Some ( ( index, elem. $getter ( ) ) ) ;
465+ return Some ( ( index, elem $ ( . $getter ( ) ) + ) ) ;
466466 }
467467 }
468468 _ => ( )
@@ -481,7 +481,7 @@ macro_rules! iterator {
481481}
482482
483483macro_rules! double_ended_iterator {
484- ( impl $name: ident -> $elem: ty, $getter: ident) => {
484+ ( impl $name: ident -> $elem: ty, $( $ getter: ident) ,+ ) => {
485485 impl <' a, T > DoubleEndedIterator <$elem> for $name<' a, T > {
486486 #[ inline]
487487 fn next_back( & mut self ) -> Option <$elem> {
@@ -490,7 +490,7 @@ macro_rules! double_ended_iterator {
490490 Some ( elem) => {
491491 if elem. is_some( ) {
492492 self . back -= 1 ;
493- return Some ( ( self . back, elem. $getter ( ) ) ) ;
493+ return Some ( ( self . back, elem$ ( . $getter ( ) ) + ) ) ;
494494 }
495495 }
496496 _ => ( )
@@ -510,8 +510,8 @@ pub struct Entries<'a, T:'a> {
510510 iter : slice:: Items < ' a , Option < T > >
511511}
512512
513- iterator ! ( impl Entries -> ( uint, & ' a T ) , get_ref )
514- double_ended_iterator ! ( impl Entries -> ( uint, & ' a T ) , get_ref )
513+ iterator ! ( impl Entries -> ( uint, & ' a T ) , as_ref , unwrap )
514+ double_ended_iterator ! ( impl Entries -> ( uint, & ' a T ) , as_ref , unwrap )
515515
516516/// Forward iterator over the key-value pairs of a map, with the
517517/// values being mutable.
@@ -521,8 +521,8 @@ pub struct MutEntries<'a, T:'a> {
521521 iter : slice:: MutItems < ' a , Option < T > >
522522}
523523
524- iterator ! ( impl MutEntries -> ( uint, & ' a mut T ) , get_mut_ref )
525- double_ended_iterator ! ( impl MutEntries -> ( uint, & ' a mut T ) , get_mut_ref )
524+ iterator ! ( impl MutEntries -> ( uint, & ' a mut T ) , as_mut , unwrap )
525+ double_ended_iterator ! ( impl MutEntries -> ( uint, & ' a mut T ) , as_mut , unwrap )
526526
527527/// Forward iterator over the keys of a map
528528pub type Keys < ' a , T > =
0 commit comments