diff --git a/imgui/src/context.rs b/imgui/src/context.rs index f4f6392..29b7bc5 100644 --- a/imgui/src/context.rs +++ b/imgui/src/context.rs @@ -243,7 +243,7 @@ impl Context { platform_name: None, renderer_name: None, clipboard_ctx: Box::new(ClipboardContext::dummy().into()), - ui: Ui(()), + ui: Ui(().into()), } } fn is_current_context(&self) -> bool { @@ -329,7 +329,7 @@ impl SuspendedContext { platform_name: None, renderer_name: None, clipboard_ctx: Box::new(ClipboardContext::dummy().into()), - ui: Ui(()), + ui: Ui(().into()), }; if ctx.is_current_context() { // Oops, the context was activated -> deactivate diff --git a/imgui/src/lib.rs b/imgui/src/lib.rs index 4c2d040..f6338cf 100644 --- a/imgui/src/lib.rs +++ b/imgui/src/lib.rs @@ -118,7 +118,7 @@ impl Context { /// A temporary reference for building the user interface for one frame #[derive(Debug)] -pub struct Ui(pub(crate) ()); +pub struct Ui(pub(crate) cell::UnsafeCell<()>); /// This is our internal buffer that we use for the Ui object. ///