gpui: Remove type bound (#41603)

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki
2025-10-30 22:17:45 +00:00
committed by GitHub
parent b059c1fce7
commit 7070038c92
+3 -3
View File
@@ -4326,10 +4326,10 @@ impl Window {
}
/// Returns a generic event listener that invokes the given listener with the view and context associated with the given view handle.
pub fn listener_for<V: Render, E>(
pub fn listener_for<T: 'static, E>(
&self,
view: &Entity<V>,
f: impl Fn(&mut V, &E, &mut Window, &mut Context<V>) + 'static,
view: &Entity<T>,
f: impl Fn(&mut T, &E, &mut Window, &mut Context<T>) + 'static,
) -> impl Fn(&E, &mut Window, &mut App) + 'static {
let view = view.downgrade();
move |e: &E, window: &mut Window, cx: &mut App| {