Cleanups preparing for WindowContext refactor (#22475)
* Remove unnecessary WindowContext and ViewContext '_ lifetimes * Removed some cases where WindowContext has a different name than `cx`. Release Notes: - N/A
This commit is contained in:
parent
9815358bdd
commit
016b5d60e1
41 changed files with 127 additions and 152 deletions
|
@ -202,7 +202,7 @@ pub trait Context {
|
|||
/// Update a window for the given handle.
|
||||
fn update_window<T, F>(&mut self, window: AnyWindowHandle, f: F) -> Result<T>
|
||||
where
|
||||
F: FnOnce(AnyView, &mut WindowContext<'_>) -> T;
|
||||
F: FnOnce(AnyView, &mut WindowContext) -> T;
|
||||
|
||||
/// Read a window off of the application context.
|
||||
fn read_window<T, R>(
|
||||
|
@ -231,7 +231,7 @@ pub trait VisualContext: Context {
|
|||
/// Construct a new view in the window referenced by this context.
|
||||
fn new_view<V>(
|
||||
&mut self,
|
||||
build_view: impl FnOnce(&mut ViewContext<'_, V>) -> V,
|
||||
build_view: impl FnOnce(&mut ViewContext<V>) -> V,
|
||||
) -> Self::Result<View<V>>
|
||||
where
|
||||
V: 'static + Render;
|
||||
|
@ -240,13 +240,13 @@ pub trait VisualContext: Context {
|
|||
fn update_view<V: 'static, R>(
|
||||
&mut self,
|
||||
view: &View<V>,
|
||||
update: impl FnOnce(&mut V, &mut ViewContext<'_, V>) -> R,
|
||||
update: impl FnOnce(&mut V, &mut ViewContext<V>) -> R,
|
||||
) -> Self::Result<R>;
|
||||
|
||||
/// Replace the root view of a window with a new view.
|
||||
fn replace_root_view<V>(
|
||||
&mut self,
|
||||
build_view: impl FnOnce(&mut ViewContext<'_, V>) -> V,
|
||||
build_view: impl FnOnce(&mut ViewContext<V>) -> V,
|
||||
) -> Self::Result<View<V>>
|
||||
where
|
||||
V: 'static + Render;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue