This commit is contained in:
KCaverly
2023-10-31 11:32:56 -04:00
parent 5550e80c4e
commit 68a1c7ce4c
5 changed files with 110 additions and 111 deletions
+2 -2
View File
@@ -255,7 +255,7 @@ pub trait ItemHandle: 'static + Send {
fn on_release(
&mut self,
cx: &mut AppContext,
callback: Box<dyn FnMut(&mut AppContext) + Send>,
callback: Box<dyn FnOnce(&mut AppContext) + Send>,
) -> gpui2::Subscription;
fn to_searchable_item_handle(&self, cx: &AppContext) -> Option<Box<dyn SearchableItemHandle>>;
fn breadcrumb_location(&self, cx: &AppContext) -> ToolbarItemLocation;
@@ -573,7 +573,7 @@ impl<T: Item> ItemHandle for View<T> {
fn on_release(
&mut self,
cx: &mut AppContext,
mut callback: Box<dyn FnMut(&mut AppContext) + Send>,
callback: Box<dyn FnOnce(&mut AppContext) + Send>,
) -> gpui2::Subscription {
cx.observe_release(self, move |_, cx| callback(cx))
}