Skip to content

Commit a383661

Browse files
committed
Remove unnecessary unsafe Send and Sync impl for WinitWindows on wasm. (#5863)
# Objective bevyengine/bevy#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 <justthecooldude@gmail.com>
1 parent 41a8ebe commit a383661

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/winit_windows.rs

-6
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,3 @@ pub fn get_best_videomode(monitor: &winit::monitor::MonitorHandle) -> winit::mon
264264

265265
modes.first().unwrap().clone()
266266
}
267-
268-
// WARNING: this only works under the assumption that wasm runtime is single threaded
269-
#[cfg(target_arch = "wasm32")]
270-
unsafe impl Send for WinitWindows {}
271-
#[cfg(target_arch = "wasm32")]
272-
unsafe impl Sync for WinitWindows {}

0 commit comments

Comments
 (0)