Also drop Sync requirement for editor handles

This commit is contained in:
Robbert van der Helm
2022-10-20 14:41:53 +02:00
parent a2a52e0ff1
commit 375262aaa3
6 changed files with 12 additions and 14 deletions

View File

@@ -299,7 +299,7 @@ impl<E: IcedEditor> Editor for IcedEditorWrapper<E> {
&self,
parent: ParentWindowHandle,
context: Arc<dyn GuiContext>,
) -> Box<dyn std::any::Any + Send + Sync> {
) -> Box<dyn std::any::Any + Send> {
let (unscaled_width, unscaled_height) = self.iced_state.size();
let scaling_factor = self.scaling_factor.load();
@@ -389,7 +389,6 @@ struct IcedEditorHandle<Message: 'static + Send> {
/// The window handle enum stored within 'WindowHandle' contains raw pointers. Is there a way around
/// having this requirement?
unsafe impl<Message: Send> Send for IcedEditorHandle<Message> {}
unsafe impl<Message: Send> Sync for IcedEditorHandle<Message> {}
impl<Message: Send> Drop for IcedEditorHandle<Message> {
fn drop(&mut self) {