From eb9b61f02322bdef4f63a004022ac678c77ea937 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 16 Mar 2016 18:22:03 +0000 Subject: [PATCH] More clean up --- src/main.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 82710ac..9b6389d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -94,11 +94,10 @@ fn main() { .with_stencil_buffer(0) .with_vsync() .build() - .ok() .expect("Could not create Glutin window."); unsafe { - window.make_current().ok().expect("Could not set current context."); + window.make_current().expect("Could not set current context."); } gl::init(&mut window); @@ -179,10 +178,8 @@ fn handle_window_event(window: &glutin::Window, game.screen_sys.on_scroll(x as f64, y as f64); } - Event::KeyboardInput(glutin::ElementState::Pressed, 41 /* ` GRAVE */, _) => { - game.console.lock().unwrap().toggle(); - } - Event::KeyboardInput(glutin::ElementState::Pressed, _, Some(VirtualKeyCode::Grave)) => { + Event::KeyboardInput(glutin::ElementState::Pressed, 41 /* ` GRAVE */, _) + | Event::KeyboardInput(glutin::ElementState::Pressed, _, Some(VirtualKeyCode::Grave)) => { game.console.lock().unwrap().toggle(); } Event::KeyboardInput(glutin::ElementState::Pressed, key, virt) => {