From 3fd8c8b3306ae33bdc85811aa410ba01967922bc Mon Sep 17 00:00:00 2001 From: Palmer Cox Date: Tue, 14 Jan 2014 22:32:24 -0500 Subject: 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. --- src/libstd/comm/select.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/comm/select.rs') diff --git a/src/libstd/comm/select.rs b/src/libstd/comm/select.rs index fa5ec1d3e30..6a10ac56a4e 100644 --- a/src/libstd/comm/select.rs +++ b/src/libstd/comm/select.rs @@ -94,7 +94,7 @@ pub struct Handle<'port, T> { priv port: &'port mut Port, } -struct PacketIterator { priv cur: *mut Packet } +struct Packets { priv cur: *mut Packet } impl Select { /// Creates a new selection structure. This set is initially empty and @@ -267,7 +267,7 @@ impl Select { (*packet).selection_id = 0; } - fn iter(&self) -> PacketIterator { PacketIterator { cur: self.head } } + fn iter(&self) -> Packets { Packets { cur: self.head } } } impl<'port, T: Send> Handle<'port, T> { @@ -300,7 +300,7 @@ impl<'port, T: Send> Drop for Handle<'port, T> { } } -impl Iterator<*mut Packet> for PacketIterator { +impl Iterator<*mut Packet> for Packets { fn next(&mut self) -> Option<*mut Packet> { if self.cur.is_null() { None -- cgit 1.4.1-3-g733a5