Skip to content

Commit a38daa4

Browse files
committed
fix(tauri-runtime-wry): redraw Send/non-Send boundaries
1 parent 112507c commit a38daa4

File tree

1 file changed

+1
-8
lines changed
  • crates/tauri-runtime-wry/src

1 file changed

+1
-8
lines changed

crates/tauri-runtime-wry/src/lib.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ pub(crate) fn send_user_message<T: UserEvent>(
253253
}
254254
}
255255

256+
unsafe impl<T: UserEvent> Send for Context<T> {}
256257
unsafe impl<T: UserEvent> Sync for Context<T> {}
257258

258259
#[derive(Clone)]
@@ -430,10 +431,6 @@ pub enum ActiveTracingSpan {
430431
#[derive(Debug)]
431432
pub struct WindowsStore(pub RefCell<BTreeMap<WindowId, WindowWrapper>>);
432433

433-
// SAFETY: we ensure this type is only used on the main thread.
434-
#[allow(clippy::non_send_fields_in_send_ty)]
435-
unsafe impl Send for WindowsStore {}
436-
437434
#[derive(Debug, Clone)]
438435
pub struct DispatcherMainThreadContext<T: UserEvent> {
439436
pub window_target: EventLoopWindowTarget<Message<T>>,
@@ -444,10 +441,6 @@ pub struct DispatcherMainThreadContext<T: UserEvent> {
444441
pub active_tracing_spans: ActiveTraceSpanStore,
445442
}
446443

447-
// SAFETY: we ensure this type is only used on the main thread.
448-
#[allow(clippy::non_send_fields_in_send_ty)]
449-
unsafe impl<T: UserEvent> Send for DispatcherMainThreadContext<T> {}
450-
451444
impl<T: UserEvent> fmt::Debug for Context<T> {
452445
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
453446
f.debug_struct("Context")

0 commit comments

Comments
 (0)