From ee65647ee19d587aa0ac3e11f4e937c93f1b9303 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 28 May 2015 19:35:42 +0200 Subject: [PATCH] Avoid a build warning in the glutin port without the window feature enabled. --- ports/glutin/window.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs index 64de0e784ed..44c1d225979 100644 --- a/ports/glutin/window.rs +++ b/ports/glutin/window.rs @@ -15,7 +15,6 @@ use layers::platform::surface::NativeGraphicsMetadata; use msg::constellation_msg; use msg::constellation_msg::Key; use net::net_error_list::NetError; -use std::mem; use std::rc::Rc; use std::sync::mpsc::{channel, Sender}; use url::Url; @@ -311,6 +310,8 @@ impl Window { } pub fn wait_events(&self) -> Vec { + use std::mem; + let mut events = mem::replace(&mut *self.event_queue.borrow_mut(), Vec::new()); let mut close_event = false;