mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 12:50:04 -04:00
Make EventLoopProxy Sync
Co-authored-by: daxpedda <daxpedda@gmail.com> Closes: #3448
This commit is contained in:
committed by
Kirill Chibisov
parent
e61a7320a2
commit
31f8b816bd
@@ -5,7 +5,7 @@ fn needs_send<T: Send>() {}
|
||||
fn event_loop_proxy_send() {
|
||||
#[allow(dead_code)]
|
||||
fn is_send<T: 'static + Send>() {
|
||||
// ensures that `winit::EventLoopProxy` implements `Send`
|
||||
// ensures that `winit::EventLoopProxy<T: Send>` implements `Send`
|
||||
needs_send::<winit::event_loop::EventLoopProxy<T>>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
#[allow(dead_code)]
|
||||
fn needs_sync<T: Sync>() {}
|
||||
|
||||
#[test]
|
||||
fn event_loop_proxy_send() {
|
||||
#[allow(dead_code)]
|
||||
fn is_send<T: 'static + Send>() {
|
||||
// ensures that `winit::EventLoopProxy<T: Send>` implements `Sync`
|
||||
needs_sync::<winit::event_loop::EventLoopProxy<T>>();
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn window_sync() {
|
||||
// ensures that `winit::Window` implements `Sync`
|
||||
|
||||
Reference in New Issue
Block a user