mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 23:01:30 +11:00
3ce7904e01
invariants This also removes the need for "box"ing the callback in favour of storing a raw `*mut` pointer. We can do this by ensuring that we never store the pointer for longer than the lifetime of the user callback, which is the duration of a call to `poll_events` or `run_forever`. Also removes old commented out event code from the window module.
12 lines
340 B
Rust
12 lines
340 B
Rust
extern crate winit;
|
|
|
|
// A part of the API requirement for `EventsLoop` is that it is `Send` + `Sync`.
|
|
//
|
|
// This short test will only compile if the `EventsLoop` is `Send` + `Sync`.
|
|
#[test]
|
|
fn send_sync() {
|
|
fn check_send_sync<T: Send + Sync>(_: T) {}
|
|
let events_loop = winit::EventsLoop::new();
|
|
check_send_sync(events_loop);
|
|
}
|