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:
parent
e90411efa2
commit
b5dc09c0ca
32 changed files with 80 additions and 87 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue