diff options
| author | bors <bors@rust-lang.org> | 2014-01-17 23:41:45 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-17 23:41:45 -0800 |
| commit | 1da2962e2ee6e0ccbe19116f4baea47f7aff0956 (patch) | |
| tree | 017112e24a62f0f7cd046a4fa85f0cf36883fec7 /src/libextra/enum_set.rs | |
| parent | 0f8c29f0b4927954fb8e7557eeb232252fcd810c (diff) | |
| parent | 3fd8c8b3306ae33bdc85811aa410ba01967922bc (diff) | |
| download | rust-1da2962e2ee6e0ccbe19116f4baea47f7aff0956.tar.gz rust-1da2962e2ee6e0ccbe19116f4baea47f7aff0956.zip | |
auto merge of #11001 : DaGenix/rust/iter-renaming, r=alexcrichton
Most Iterators renamed to make their naming more consistent. Most significantly, the Iterator and Iter suffixes have been completely removed.
Diffstat (limited to 'src/libextra/enum_set.rs')
| -rw-r--r-- | src/libextra/enum_set.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libextra/enum_set.rs b/src/libextra/enum_set.rs index e0461778075..f12da3080aa 100644 --- a/src/libextra/enum_set.rs +++ b/src/libextra/enum_set.rs @@ -77,8 +77,8 @@ impl<E:CLike> EnumSet<E> { } /// Returns an iterator over an EnumSet - pub fn iter(&self) -> EnumSetIterator<E> { - EnumSetIterator::new(self.bits) + pub fn iter(&self) -> Items<E> { + Items::new(self.bits) } } @@ -101,18 +101,18 @@ impl<E:CLike> BitAnd<EnumSet<E>, EnumSet<E>> for EnumSet<E> { } /// An iterator over an EnumSet -pub struct EnumSetIterator<E> { +pub struct Items<E> { priv index: uint, priv bits: uint, } -impl<E:CLike> EnumSetIterator<E> { - fn new(bits: uint) -> EnumSetIterator<E> { - EnumSetIterator { index: 0, bits: bits } +impl<E:CLike> Items<E> { + fn new(bits: uint) -> Items<E> { + Items { index: 0, bits: bits } } } -impl<E:CLike> Iterator<E> for EnumSetIterator<E> { +impl<E:CLike> Iterator<E> for Items<E> { fn next(&mut self) -> Option<E> { if (self.bits == 0) { return None; |
