diff options
author | Mike Dilger <mike@efx.co.nz> | 2015-01-05 15:46:46 +1300 |
---|---|---|
committer | Mike Dilger <mike@efx.co.nz> | 2015-01-05 16:06:16 +1300 |
commit | 53482b2a460811b136e81ffd10eb12088f36f310 (patch) | |
tree | 905328d4d138f8f7e84836026f4efa48b89419a3 /src | |
parent | 2174177fda57004e49dfefb75e63f551b16ab6e7 (diff) | |
download | glutin-53482b2a460811b136e81ffd10eb12088f36f310.tar.gz glutin-53482b2a460811b136e81ffd10eb12088f36f310.zip |
fix for Iterator now using associated types
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -2,6 +2,7 @@ #![feature(globs)] #![feature(phase)] #![unstable] +#![feature(associated_types)] //! The purpose of this library is to provide an OpenGL context on as many //! platforms as possible. @@ -641,7 +642,8 @@ pub struct PollEventsIterator<'a> { data: RingBufIter<Event>, } -impl<'a> Iterator<Event> for PollEventsIterator<'a> { +impl<'a> Iterator for PollEventsIterator<'a> { + type Item = Event; fn next(&mut self) -> Option<Event> { self.data.next() } @@ -654,7 +656,8 @@ pub struct WaitEventsIterator<'a> { data: RingBufIter<Event>, } -impl<'a> Iterator<Event> for WaitEventsIterator<'a> { +impl<'a> Iterator for WaitEventsIterator<'a> { + type Item = Event; fn next(&mut self) -> Option<Event> { self.data.next() } @@ -669,7 +672,8 @@ pub struct AvailableMonitorsIter { } #[cfg(feature = "window")] -impl Iterator<MonitorID> for AvailableMonitorsIter { +impl Iterator for AvailableMonitorsIter { + type Item = MonitorID; fn next(&mut self) -> Option<MonitorID> { self.data.next().map(|id| MonitorID(id)) } |