mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-02-06 14:17:02 +00:00
fix(tauri-runtime-wry): redraw Send/non-Send boundaries
This commit is contained in:
parent
cea1282128
commit
9bf1b7f254
@ -253,6 +253,7 @@ pub(crate) fn send_user_message<T: UserEvent>(
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl<T: UserEvent> Send for Context<T> {}
|
||||
unsafe impl<T: UserEvent> Sync for Context<T> {}
|
||||
|
||||
#[derive(Clone)]
|
||||
@ -430,10 +431,6 @@ pub enum ActiveTracingSpan {
|
||||
#[derive(Debug)]
|
||||
pub struct WindowsStore(pub RefCell<BTreeMap<WindowId, WindowWrapper>>);
|
||||
|
||||
// SAFETY: we ensure this type is only used on the main thread.
|
||||
#[allow(clippy::non_send_fields_in_send_ty)]
|
||||
unsafe impl Send for WindowsStore {}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct DispatcherMainThreadContext<T: UserEvent> {
|
||||
pub window_target: EventLoopWindowTarget<Message<T>>,
|
||||
@ -444,10 +441,6 @@ pub struct DispatcherMainThreadContext<T: UserEvent> {
|
||||
pub active_tracing_spans: ActiveTraceSpanStore,
|
||||
}
|
||||
|
||||
// SAFETY: we ensure this type is only used on the main thread.
|
||||
#[allow(clippy::non_send_fields_in_send_ty)]
|
||||
unsafe impl<T: UserEvent> Send for DispatcherMainThreadContext<T> {}
|
||||
|
||||
impl<T: UserEvent> fmt::Debug for Context<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("Context")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user