Skip to content

Commit 13d3de8

Browse files
authored
Remove unnecessary unsafe impls for WinitWindows on Wasm (#11270)
# Objective In the past `winit::window::Window` was not Send + Sync on web. rust-windowing/winit#2834 made `winit::window::Window` Sync + Send so Bevy's `unsafe impl` is no longer necessary. ## Solution Remove the unsafe impls.
1 parent 6901688 commit 13d3de8

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

crates/bevy_winit/src/winit_windows.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,3 @@ pub fn winit_window_position(
356356
}
357357
}
358358
}
359-
360-
// WARNING: this only works under the assumption that wasm runtime is single threaded
361-
#[cfg(target_arch = "wasm32")]
362-
unsafe impl Send for WinitWindows {}
363-
#[cfg(target_arch = "wasm32")]
364-
unsafe impl Sync for WinitWindows {}

0 commit comments

Comments
 (0)