mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11:00
7b23d190b1
* 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`
28 lines
712 B
Rust
28 lines
712 B
Rust
#[allow(dead_code)]
|
|
fn needs_send<T: Send>() {}
|
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
#[test]
|
|
fn event_loop_proxy_send() {
|
|
#[allow(dead_code)]
|
|
fn is_send<T: 'static + Send>() {
|
|
// ensures that `winit::EventLoopProxy` implements `Send`
|
|
needs_send::<winit::event_loop::EventLoopProxy<T>>();
|
|
}
|
|
}
|
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
#[test]
|
|
fn window_send() {
|
|
// ensures that `winit::Window` implements `Send`
|
|
needs_send::<winit::window::Window>();
|
|
}
|
|
|
|
#[test]
|
|
fn ids_send() {
|
|
// ensures that the various `..Id` types implement `Send`
|
|
needs_send::<winit::window::WindowId>();
|
|
needs_send::<winit::event::DeviceId>();
|
|
needs_send::<winit::monitor::MonitorHandle>();
|
|
}
|