winit/tests/sync_object.rs
Kirill Chibisov 241b7a80bb
api: convert Window to dyn Window
This should allow us to make future split of backends much easier.
The `Box<dyn Window>` is a _temporary_ solution, which will be
removed with the future updates when we decide on how the Window
should be stored.
2024-08-23 23:40:27 +03:00

23 lines
461 B
Rust

#[allow(dead_code)]
fn needs_sync<T: Sync + ?Sized>() {}
#[test]
fn event_loop_proxy_send() {
needs_sync::<winit::event_loop::EventLoopProxy>();
}
#[test]
fn window_sync() {
needs_sync::<dyn winit::window::Window>();
}
#[test]
fn window_builder_sync() {
needs_sync::<winit::window::WindowAttributes>();
}
#[test]
fn custom_cursor_sync() {
needs_sync::<winit::window::CustomCursorSource>();
needs_sync::<winit::window::CustomCursor>();
}