diff options
| author | Palmer Cox <p@lmercox.com> | 2014-01-14 22:32:24 -0500 |
|---|---|---|
| committer | Palmer Cox <p@lmercox.com> | 2014-01-18 01:15:15 -0500 |
| commit | 3fd8c8b3306ae33bdc85811aa410ba01967922bc (patch) | |
| tree | 36818b3c2f6f3c6ba8e145f4a1098dcb87f5bb44 /src/libstd/io/extensions.rs | |
| parent | c58d2bacb78ed0d2b9c0c0909e56f390b525aabd (diff) | |
| download | rust-3fd8c8b3306ae33bdc85811aa410ba01967922bc.tar.gz rust-3fd8c8b3306ae33bdc85811aa410ba01967922bc.zip | |
Rename iterators for consistency
Rename existing iterators to get rid of the Iterator suffix and to give them names that better describe the things being iterated over.
Diffstat (limited to 'src/libstd/io/extensions.rs')
| -rw-r--r-- | src/libstd/io/extensions.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/io/extensions.rs b/src/libstd/io/extensions.rs index cc0cb6b3446..511462f89f8 100644 --- a/src/libstd/io/extensions.rs +++ b/src/libstd/io/extensions.rs @@ -24,7 +24,7 @@ use vec::{OwnedVector, ImmutableVector}; /// /// # Notes about the Iteration Protocol /// -/// The `ByteIterator` may yield `None` and thus terminate +/// The `Bytes` may yield `None` and thus terminate /// an iteration, but continue to yield elements if iteration /// is attempted again. /// @@ -33,17 +33,17 @@ use vec::{OwnedVector, ImmutableVector}; /// Raises the same conditions as the `read` method, for /// each call to its `.next()` method. /// Yields `None` if the condition is handled. -pub struct ByteIterator<'r, T> { +pub struct Bytes<'r, T> { priv reader: &'r mut T, } -impl<'r, R: Reader> ByteIterator<'r, R> { - pub fn new(r: &'r mut R) -> ByteIterator<'r, R> { - ByteIterator { reader: r } +impl<'r, R: Reader> Bytes<'r, R> { + pub fn new(r: &'r mut R) -> Bytes<'r, R> { + Bytes { reader: r } } } -impl<'r, R: Reader> Iterator<u8> for ByteIterator<'r, R> { +impl<'r, R: Reader> Iterator<u8> for Bytes<'r, R> { #[inline] fn next(&mut self) -> Option<u8> { self.reader.read_byte() |
