mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
Fix web errors (#1040)
* Fix old `use` declarations
* Fix hidden lifetime parameter
* Fix missing methods in `web::Monitor`.
Originally fixed by @ryanisaacg in 94387c4bf5.
* Disable some tests and examples on `wasm32`
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user