From a383661af7aacebc132262bfff3a238dff8d62b9 Mon Sep 17 00:00:00 2001 From: ira Date: Fri, 2 Sep 2022 16:17:46 +0000 Subject: [PATCH] Remove unnecessary unsafe `Send` and `Sync` impl for `WinitWindows` on wasm. (#5863) # Objective https://github.com/bevyengine/bevy/pull/503 added these. I don't know what problem it solved, the PR doesn't say and the code didn't make it obvious to me. ## Solution AFAIK removing unsafe `Send`/`Sync` impls can't introduce unsoundness. Yeet. ## Migration Guide Why tho. Co-authored-by: devil-ira --- src/winit_windows.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/winit_windows.rs b/src/winit_windows.rs index 2cf9076..3eb514d 100644 --- a/src/winit_windows.rs +++ b/src/winit_windows.rs @@ -264,9 +264,3 @@ pub fn get_best_videomode(monitor: &winit::monitor::MonitorHandle) -> winit::mon modes.first().unwrap().clone() } - -// WARNING: this only works under the assumption that wasm runtime is single threaded -#[cfg(target_arch = "wasm32")] -unsafe impl Send for WinitWindows {} -#[cfg(target_arch = "wasm32")] -unsafe impl Sync for WinitWindows {}