about summary refs log tree commit diff
path: root/src/libstd/comm/mod.rs
diff options
context:
space:
mode:
authorPalmer Cox <p@lmercox.com>2014-01-14 22:32:24 -0500
committerPalmer Cox <p@lmercox.com>2014-01-18 01:15:15 -0500
commit3fd8c8b3306ae33bdc85811aa410ba01967922bc (patch)
tree36818b3c2f6f3c6ba8e145f4a1098dcb87f5bb44 /src/libstd/comm/mod.rs
parentc58d2bacb78ed0d2b9c0c0909e56f390b525aabd (diff)
downloadrust-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/comm/mod.rs')
-rw-r--r--src/libstd/comm/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/comm/mod.rs b/src/libstd/comm/mod.rs
index 985a387ee2b..26d67daf7c1 100644
--- a/src/libstd/comm/mod.rs
+++ b/src/libstd/comm/mod.rs
@@ -305,7 +305,7 @@ pub struct Port<T> {
 /// An iterator over messages received on a port, this iterator will block
 /// whenever `next` is called, waiting for a new message, and `None` will be
 /// returned when the corresponding channel has hung up.
-pub struct PortIterator<'a, T> {
+pub struct Messages<'a, T> {
     priv port: &'a Port<T>
 }
 
@@ -899,12 +899,12 @@ impl<T: Send> Port<T> {
 
     /// Returns an iterator which will block waiting for messages, but never
     /// `fail!`. It will return `None` when the channel has hung up.
-    pub fn iter<'a>(&'a self) -> PortIterator<'a, T> {
-        PortIterator { port: self }
+    pub fn iter<'a>(&'a self) -> Messages<'a, T> {
+        Messages { port: self }
     }
 }
 
-impl<'a, T: Send> Iterator<T> for PortIterator<'a, T> {
+impl<'a, T: Send> Iterator<T> for Messages<'a, T> {
     fn next(&mut self) -> Option<T> { self.port.recv_opt() }
 }