Remove `update_context` helper.
For style, call `update()` on the context directly from each iterator.
@@ -59,7 +59,7 @@ impl<'a> Iterator for WaitEventsIterator<'a> {
fn next(&mut self) -> Option<winit::Event> {
let event = self.winit_iterator.next();
match event {
- Some(winit::Event::Resized(_, _)) => self.window.update_context(),
+ Some(winit::Event::Resized(_, _)) => unsafe { self.window.context.update() },
_ => {},
}
event
@@ -77,7 +77,7 @@ impl<'a> Iterator for PollEventsIterator<'a> {
fn next(&mut self) -> Option<winit::Event> {
let event = self.winit_iterator.next();
match event {
- Some(winit::Event::Resized(_, _)) => self.window.update_context(),
+ Some(winit::Event::Resized(_, _)) => unsafe { self.window.context.update() },
_ => {},
}
event
@@ -186,12 +186,6 @@ impl Window {
}
}
- fn update_context(&self) {
- unsafe {
- self.context.update()
- }
- }
-
pub fn set_title(&self, title: &str) {
self.winit_window.set_title(title)
}
