mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
Merge pull request #184 from mikedilger/upstream_fallout
fix for Iterator now using associated types
This commit is contained in:
commit
bfd21793a8
10
src/lib.rs
10
src/lib.rs
|
@ -2,6 +2,7 @@
|
||||||
#![feature(globs)]
|
#![feature(globs)]
|
||||||
#![feature(phase)]
|
#![feature(phase)]
|
||||||
#![unstable]
|
#![unstable]
|
||||||
|
#![feature(associated_types)]
|
||||||
|
|
||||||
//! The purpose of this library is to provide an OpenGL context on as many
|
//! The purpose of this library is to provide an OpenGL context on as many
|
||||||
//! platforms as possible.
|
//! platforms as possible.
|
||||||
|
@ -641,7 +642,8 @@ pub struct PollEventsIterator<'a> {
|
||||||
data: RingBufIter<Event>,
|
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> {
|
fn next(&mut self) -> Option<Event> {
|
||||||
self.data.next()
|
self.data.next()
|
||||||
}
|
}
|
||||||
|
@ -654,7 +656,8 @@ pub struct WaitEventsIterator<'a> {
|
||||||
data: RingBufIter<Event>,
|
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> {
|
fn next(&mut self) -> Option<Event> {
|
||||||
self.data.next()
|
self.data.next()
|
||||||
}
|
}
|
||||||
|
@ -669,7 +672,8 @@ pub struct AvailableMonitorsIter {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "window")]
|
#[cfg(feature = "window")]
|
||||||
impl Iterator<MonitorID> for AvailableMonitorsIter {
|
impl Iterator for AvailableMonitorsIter {
|
||||||
|
type Item = MonitorID;
|
||||||
fn next(&mut self) -> Option<MonitorID> {
|
fn next(&mut self) -> Option<MonitorID> {
|
||||||
self.data.next().map(|id| MonitorID(id))
|
self.data.next().map(|id| MonitorID(id))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue