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
|
@ -8,7 +8,7 @@ use workspace::Workspace;
|
|||
|
||||
fn task_context_with_editor(
|
||||
editor: &mut Editor,
|
||||
cx: &mut WindowContext<'_>,
|
||||
cx: &mut WindowContext,
|
||||
) -> AsyncTask<Option<TaskContext>> {
|
||||
let Some(project) = editor.project.clone() else {
|
||||
return AsyncTask::ready(None);
|
||||
|
@ -74,7 +74,7 @@ fn task_context_with_editor(
|
|||
})
|
||||
}
|
||||
|
||||
pub fn task_context(workspace: &Workspace, cx: &mut WindowContext<'_>) -> AsyncTask<TaskContext> {
|
||||
pub fn task_context(workspace: &Workspace, cx: &mut WindowContext) -> AsyncTask<TaskContext> {
|
||||
let Some(editor) = workspace
|
||||
.active_item(cx)
|
||||
.and_then(|item| item.act_as::<Editor>(cx))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue