diff --git a/crates/gpui2/src/action.rs b/crates/gpui2/src/action.rs
index 638e5c6ca3..84843c9876 100644
--- a/crates/gpui2/src/action.rs
+++ b/crates/gpui2/src/action.rs
@@ -4,7 +4,7 @@ use collections::{HashMap, HashSet};
use serde::Deserialize;
use std::any::{type_name, Any};
-pub trait Action: Any + Send {
+pub trait Action: 'static {
fn qualified_name() -> SharedString
where
Self: Sized;
@@ -19,7 +19,7 @@ pub trait Action: Any + Send {
impl Action for A
where
- A: for<'a> Deserialize<'a> + PartialEq + Any + Send + Clone + Default,
+ A: for<'a> Deserialize<'a> + PartialEq + Clone + Default + 'static,
{
fn qualified_name() -> SharedString {
type_name::().into()
diff --git a/crates/gpui2/src/app.rs b/crates/gpui2/src/app.rs
index f08c7fb86b..48a9324b05 100644
--- a/crates/gpui2/src/app.rs
+++ b/crates/gpui2/src/app.rs
@@ -685,7 +685,7 @@ impl AppContext {
pub fn observe_release(
&mut self,
handle: &E,
- on_release: impl FnOnce(&mut T, &mut AppContext) + Send + 'static,
+ on_release: impl FnOnce(&mut T, &mut AppContext) + 'static,
) -> Subscription
where
E: Entity,
diff --git a/crates/gpui2/src/app/async_context.rs b/crates/gpui2/src/app/async_context.rs
index 1f46578a97..01af7ae194 100644
--- a/crates/gpui2/src/app/async_context.rs
+++ b/crates/gpui2/src/app/async_context.rs
@@ -163,7 +163,7 @@ impl AsyncWindowContext {
self.app.update_window(self.window, update)
}
- pub fn on_next_frame(&mut self, f: impl FnOnce(&mut WindowContext) + Send + 'static) {
+ pub fn on_next_frame(&mut self, f: impl FnOnce(&mut WindowContext) + 'static) {
self.window.update(self, |_, cx| cx.on_next_frame(f)).ok();
}
@@ -184,13 +184,10 @@ impl AsyncWindowContext {
self.window.update(self, |_, cx| cx.update_global(update))
}
- pub fn spawn(
- &self,
- f: impl FnOnce(AsyncWindowContext) -> Fut + Send + 'static,
- ) -> Task
+ pub fn spawn(&self, f: impl FnOnce(AsyncWindowContext) -> Fut + 'static) -> Task
where
- Fut: Future