Skip to content

Commit

Permalink
Merge pull request #31 from jamesrhurst/exactsize
Browse files Browse the repository at this point in the history
ExactSize is now ExactSizeIterator
  • Loading branch information
sfackler committed Nov 27, 2014
2 parents 4ad2bb2 + 6a7cc6e commit d20c311
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions phf/src/map.rs
Expand Up @@ -146,7 +146,7 @@ impl<'a, K, V> DoubleEndedIterator<&'a (K, V)> for Entries<'a, K, V> {
}
}

impl<'a, K, V> ExactSize<&'a (K, V)> for Entries<'a, K, V> {}
impl<'a, K, V> ExactSizeIterator<&'a (K, V)> for Entries<'a, K, V> {}

/// An iterator over the keys in a `Map`.
pub struct Keys<'a, K:'a, V:'a> {
Expand All @@ -169,7 +169,7 @@ impl<'a, K, V> DoubleEndedIterator<&'a K> for Keys<'a, K, V> {
}
}

impl<'a, K, V> ExactSize<&'a K> for Keys<'a, K, V> {}
impl<'a, K, V> ExactSizeIterator<&'a K> for Keys<'a, K, V> {}

/// An iterator over the values in a `Map`.
pub struct Values<'a, K:'a, V:'a> {
Expand All @@ -192,4 +192,4 @@ impl<'a, K, V> DoubleEndedIterator<&'a V> for Values<'a, K, V> {
}
}

impl<'a, K, V> ExactSize<&'a V> for Values<'a, K, V> {}
impl<'a, K, V> ExactSizeIterator<&'a V> for Values<'a, K, V> {}
6 changes: 3 additions & 3 deletions phf/src/ordered_map.rs
Expand Up @@ -175,7 +175,7 @@ impl<'a, K, V> RandomAccessIterator<&'a (K, V)> for Entries<'a, K, V> {
}
}

impl<'a, K, V> ExactSize<&'a (K, V)> for Entries<'a, K, V> {}
impl<'a, K, V> ExactSizeIterator<&'a (K, V)> for Entries<'a, K, V> {}

/// An iterator over the keys in a `OrderedMap`.
pub struct Keys<'a, K:'a, V:'a> {
Expand Down Expand Up @@ -208,7 +208,7 @@ impl<'a, K, V> RandomAccessIterator<&'a K> for Keys<'a, K, V> {
}
}

impl<'a, K, V> ExactSize<&'a K> for Keys<'a, K, V> {}
impl<'a, K, V> ExactSizeIterator<&'a K> for Keys<'a, K, V> {}

/// An iterator over the values in a `OrderedMap`.
pub struct Values<'a, K:'a, V:'a> {
Expand Down Expand Up @@ -241,4 +241,4 @@ impl<'a, K, V> RandomAccessIterator<&'a V> for Values<'a, K, V> {
}
}

impl<'a, K, V> ExactSize<&'a V> for Values<'a, K, V> {}
impl<'a, K, V> ExactSizeIterator<&'a V> for Values<'a, K, V> {}
2 changes: 1 addition & 1 deletion phf/src/ordered_set.rs
Expand Up @@ -146,5 +146,5 @@ impl<'a, T> RandomAccessIterator<&'a T> for Entries<'a, T> {
}
}

impl<'a, T> ExactSize<&'a T> for Entries<'a, T> {}
impl<'a, T> ExactSizeIterator<&'a T> for Entries<'a, T> {}

2 changes: 1 addition & 1 deletion phf/src/set.rs
Expand Up @@ -120,6 +120,6 @@ impl<'a, T> DoubleEndedIterator<&'a T> for Items<'a, T> {
}
}

impl<'a, T> ExactSize<&'a T> for Items<'a, T> {}
impl<'a, T> ExactSizeIterator<&'a T> for Items<'a, T> {}


0 comments on commit d20c311

Please sign in to comment.