@ -2,7 +2,7 @@
use super ::* ;
use super ::* ;
/// An iterator over `Page`s
/// An iterator over `Page`s
pub struct Pages < ' a , K , V > ( pub ( crate ) std ::slice ::Iter < ' a , Page < K , V > > ) ;
pub struct Pages < ' a , K , V > ( pub ( crate ) core ::slice ::Iter < ' a , Page < K , V > > ) ;
impl < ' a , K , V > Iterator for Pages < ' a , K , V >
impl < ' a , K , V > Iterator for Pages < ' a , K , V >
{
{
@ -18,7 +18,7 @@ impl<'a, K, V> Iterator for Pages<'a,K,V>
}
}
/// A mutable iterator over `Page`s
/// A mutable iterator over `Page`s
pub struct PagesMut < ' a , K , V > ( pub ( crate ) std ::slice ::IterMut < ' a , Page < K , V > > ) ;
pub struct PagesMut < ' a , K , V > ( pub ( crate ) core ::slice ::IterMut < ' a , Page < K , V > > ) ;
impl < ' a , K , V > Iterator for PagesMut < ' a , K , V >
impl < ' a , K , V > Iterator for PagesMut < ' a , K , V >
{
{
@ -34,10 +34,10 @@ impl<'a, K, V> Iterator for PagesMut<'a,K,V>
}
}
impl < ' a , K , V > ExactSizeIterator for PagesMut < ' a , K , V > { }
impl < ' a , K , V > ExactSizeIterator for PagesMut < ' a , K , V > { }
impl < ' a , K , V > std ::iter ::FusedIterator for PagesMut < ' a , K , V > { }
impl < ' a , K , V > core ::iter ::FusedIterator for PagesMut < ' a , K , V > { }
/// An iterator over elements in a `Page`.
/// An iterator over elements in a `Page`.
pub struct PageElements < ' a , K , V > ( pub ( crate ) std ::slice ::Iter < ' a , Option < ( K , V ) > > ) ;
pub struct PageElements < ' a , K , V > ( pub ( crate ) core ::slice ::Iter < ' a , Option < ( K , V ) > > ) ;
impl < ' a , K , V > Iterator for PageElements < ' a , K , V >
impl < ' a , K , V > Iterator for PageElements < ' a , K , V >
{
{
@ -57,10 +57,10 @@ impl<'a, K, V> Iterator for PageElements<'a,K,V>
( 0 , self . 0. size_hint ( ) . 1 )
( 0 , self . 0. size_hint ( ) . 1 )
}
}
}
}
impl < ' a , K , V > std ::iter ::FusedIterator for PageElements < ' a , K , V > { }
impl < ' a , K , V > core ::iter ::FusedIterator for PageElements < ' a , K , V > { }
/// A mutable iterator over elements in a `Page`.
/// A mutable iterator over elements in a `Page`.
pub struct PageElementsMut < ' a , K , V > ( pub ( crate ) std ::slice ::IterMut < ' a , Option < ( K , V ) > > ) ;
pub struct PageElementsMut < ' a , K , V > ( pub ( crate ) core ::slice ::IterMut < ' a , Option < ( K , V ) > > ) ;
impl < ' a , K , V > Iterator for PageElementsMut < ' a , K , V >
impl < ' a , K , V > Iterator for PageElementsMut < ' a , K , V >
{
{
@ -79,7 +79,7 @@ impl<'a, K, V> Iterator for PageElementsMut<'a,K,V>
( 0 , self . 0. size_hint ( ) . 1 )
( 0 , self . 0. size_hint ( ) . 1 )
}
}
}
}
impl < ' a , K , V > std ::iter ::FusedIterator for PageElementsMut < ' a , K , V > { }
impl < ' a , K , V > core ::iter ::FusedIterator for PageElementsMut < ' a , K , V > { }
/// A consuming iterator over elements in a `Page`.
/// A consuming iterator over elements in a `Page`.
pub struct IntoPageElements < K , V > ( pub ( crate ) [ Option < ( K , V ) > ; MAX ] , pub ( crate ) usize ) ;
pub struct IntoPageElements < K , V > ( pub ( crate ) [ Option < ( K , V ) > ; MAX ] , pub ( crate ) usize ) ;
@ -104,7 +104,7 @@ impl<K,V> Iterator for IntoPageElements<K,V>
( 0 , Some ( self . 0. len ( ) ) )
( 0 , Some ( self . 0. len ( ) ) )
}
}
}
}
impl < K , V > std ::iter ::FusedIterator for IntoPageElements < K , V > { }
impl < K , V > core ::iter ::FusedIterator for IntoPageElements < K , V > { }
/// An iterator over entries in a `Map`.
/// An iterator over entries in a `Map`.
pub struct Iter < ' a , K , V > ( pub ( crate ) Option < PageElements < ' a , K , V > > , pub ( crate ) Pages < ' a , K , V > ) ;
pub struct Iter < ' a , K , V > ( pub ( crate ) Option < PageElements < ' a , K , V > > , pub ( crate ) Pages < ' a , K , V > ) ;
@ -131,7 +131,7 @@ where K: Collapse
( 0 , self . 1. size_hint ( ) . 1. map ( | x | x * MAX ) )
( 0 , self . 1. size_hint ( ) . 1. map ( | x | x * MAX ) )
}
}
}
}
impl < ' a , K : Collapse , V > std ::iter ::FusedIterator for Iter < ' a , K , V > { }
impl < ' a , K : Collapse , V > core ::iter ::FusedIterator for Iter < ' a , K , V > { }
/// A mutable iterator over entries in a `Map`.
/// A mutable iterator over entries in a `Map`.
pub struct IterMut < ' a , K , V > ( pub ( crate ) Option < PageElementsMut < ' a , K , V > > , pub ( crate ) PagesMut < ' a , K , V > ) ;
pub struct IterMut < ' a , K , V > ( pub ( crate ) Option < PageElementsMut < ' a , K , V > > , pub ( crate ) PagesMut < ' a , K , V > ) ;
@ -158,10 +158,10 @@ where K: Collapse
( 0 , self . 1. size_hint ( ) . 1. map ( | x | x * MAX ) )
( 0 , self . 1. size_hint ( ) . 1. map ( | x | x * MAX ) )
}
}
}
}
impl < ' a , K : Collapse , V > std ::iter ::FusedIterator for IterMut < ' a , K , V > { }
impl < ' a , K : Collapse , V > core ::iter ::FusedIterator for IterMut < ' a , K , V > { }
/// A consuming iterator over entries in a `Map`.
/// A consuming iterator over entries in a `Map`.
pub struct IntoIter < K , V > ( pub ( crate ) Option < IntoPageElements < K , V > > , pub ( crate ) std:: vec::IntoIter < Page < K , V > > ) ;
pub struct IntoIter < K , V > ( pub ( crate ) Option < IntoPageElements < K , V > > , pub ( crate ) vec::IntoIter < Page < K , V > > ) ;
impl < K , V > Iterator for IntoIter < K , V >
impl < K , V > Iterator for IntoIter < K , V >
where K : Collapse
where K : Collapse
@ -187,7 +187,7 @@ where K: Collapse
}
}
}
}
impl < K : Collapse , V > std ::iter ::FusedIterator for IntoIter < K , V > { }
impl < K : Collapse , V > core ::iter ::FusedIterator for IntoIter < K , V > { }
#[ cfg(test) ]
#[ cfg(test) ]
mod tests
mod tests