From d688174b8b23621bbd46c1e7da400af864cce841 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 3 Mar 2022 15:39:17 +0100 Subject: [PATCH] Require Send+Sync on the editor handle --- nih_plug_egui/src/lib.rs | 2 +- src/plugin.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nih_plug_egui/src/lib.rs b/nih_plug_egui/src/lib.rs index 19a68cd8..b353e040 100644 --- a/nih_plug_egui/src/lib.rs +++ b/nih_plug_egui/src/lib.rs @@ -88,7 +88,7 @@ where &self, parent: ParentWindowHandle, context: Arc, - ) -> Box { + ) -> Box { let update = self.update.clone(); let state = self.user_state.clone(); diff --git a/src/plugin.rs b/src/plugin.rs index 74b4a182..3e79966b 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -204,7 +204,11 @@ pub trait Editor: Send + Sync { // otherwise be basically impossible to have this still be GUI-framework agnostic. Any // callback that deos involve actual GUI operations will still be spooled to the IRunLoop // instance. - fn spawn(&self, parent: ParentWindowHandle, context: Arc) -> Box; + fn spawn( + &self, + parent: ParentWindowHandle, + context: Arc, + ) -> Box; /// Return the (currnent) size of the editor in pixels as a `(width, height)` pair. fn size(&self) -> (u32, u32);