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:
parent
53e646dabc
commit
7b23d190b1
10 changed files with 65 additions and 36 deletions
|
|
@ -1,10 +1,11 @@
|
|||
use winit::{
|
||||
event::{Event, WindowEvent},
|
||||
event_loop::{ControlFlow, EventLoop},
|
||||
window::WindowBuilder,
|
||||
};
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
fn main() {
|
||||
use winit::{
|
||||
event::{Event, WindowEvent},
|
||||
event_loop::{ControlFlow, EventLoop},
|
||||
window::WindowBuilder,
|
||||
};
|
||||
|
||||
let event_loop: EventLoop<i32> = EventLoop::new_user_event();
|
||||
|
||||
let _window = WindowBuilder::new()
|
||||
|
|
@ -35,3 +36,8 @@ fn main() {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn main() {
|
||||
panic!("Example not supported on Wasm");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue