Fix web errors (#1040)

* Fix old `use` declarations

* Fix hidden lifetime parameter

* Fix missing methods in `web::Monitor`.

Originally fixed by @ryanisaacg in 94387c4bf5bca35f4e24562ce89a4f4badd53aa8.

* Disable some tests and examples on `wasm32`
This commit is contained in:
Héctor Ramón 2019-07-11 00:54:54 +02:00 committed by Osspial
parent 53e646dabc
commit 7b23d190b1
10 changed files with 65 additions and 36 deletions

View file

@ -1,11 +1,11 @@
use winit::{
event::{Event, WindowEvent},
event_loop::{ControlFlow, EventLoop},
platform::desktop::EventLoopExtDesktop,
window::WindowBuilder,
};
#[cfg(not(target_arch = "wasm32"))]
fn main() {
use winit::{
event::{Event, WindowEvent},
event_loop::{ControlFlow, EventLoop},
platform::desktop::EventLoopExtDesktop,
window::WindowBuilder,
};
let mut event_loop = EventLoop::new();
let window = WindowBuilder::new()
@ -39,3 +39,8 @@ fn main() {
println!("Okay we're done now for real.");
}
#[cfg(target_arch = "wasm32")]
fn main() {
panic!("Example not supported on Wasm");
}