From f5c76d93bce0f0864535b8d8c91b85e1e668efa8 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 19 Oct 2023 10:25:54 -0400 Subject: [PATCH] Add missing `Arc` for `on_click` handler --- crates/ui2/src/components/workspace.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui2/src/components/workspace.rs b/crates/ui2/src/components/workspace.rs index fc385542d054283df2aea1269073bc53ceaddb2f..13e652791d07c6b14897c80a8ced40a259cc6d1d 100644 --- a/crates/ui2/src/components/workspace.rs +++ b/crates/ui2/src/components/workspace.rs @@ -1,3 +1,5 @@ +use std::sync::Arc; + use chrono::DateTime; use gpui3::{px, relative, view, Context, Size, View}; @@ -303,7 +305,7 @@ impl Workspace { .child( h_stack().gap_2().child( Button::::new("Toggle Debug") - .on_click(|workspace, cx| workspace.toggle_debug(cx)), + .on_click(Arc::new(|workspace, cx| workspace.toggle_debug(cx))), ), ) }