Remove unneeded anonymous lifetimes from gpui::Context (#27686)

This PR removes a number of unneeded anonymous lifetimes from usages of
`gpui::Context`.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-03-28 15:26:30 -04:00 committed by GitHub
parent e90411efa2
commit b5dc09c0ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 80 additions and 87 deletions

View file

@ -168,7 +168,7 @@ pub trait AppContext {
/// Create a new entity in the app context.
fn new<T: 'static>(
&mut self,
build_entity: impl FnOnce(&mut Context<'_, T>) -> T,
build_entity: impl FnOnce(&mut Context<T>) -> T,
) -> Self::Result<Entity<T>>;
/// Reserve a slot for a entity to be inserted later.
@ -181,14 +181,14 @@ pub trait AppContext {
fn insert_entity<T: 'static>(
&mut self,
reservation: Reservation<T>,
build_entity: impl FnOnce(&mut Context<'_, T>) -> T,
build_entity: impl FnOnce(&mut Context<T>) -> T,
) -> Self::Result<Entity<T>>;
/// Update a entity in the app context.
fn update_entity<T, R>(
&mut self,
handle: &Entity<T>,
update: impl FnOnce(&mut T, &mut Context<'_, T>) -> R,
update: impl FnOnce(&mut T, &mut Context<T>) -> R,
) -> Self::Result<R>
where
T: 'static;
@ -254,7 +254,7 @@ pub trait VisualContext: AppContext {
/// Update a view with the given callback
fn new_window_entity<T: 'static>(
&mut self,
build_entity: impl FnOnce(&mut Window, &mut Context<'_, T>) -> T,
build_entity: impl FnOnce(&mut Window, &mut Context<T>) -> T,
) -> Self::Result<Entity<T>>;
/// Replace the root view of a window with a new view.