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:
Michael Sloan 2024-12-28 14:36:14 -07:00 committed by GitHub
parent 9815358bdd
commit 016b5d60e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 127 additions and 152 deletions

View file

@ -4991,7 +4991,7 @@ fn jump_data(
block_row_start: DisplayRow,
height: u32,
for_excerpt: &ExcerptInfo,
cx: &mut WindowContext<'_>,
cx: &mut WindowContext,
) -> JumpData {
let range = &for_excerpt.range;
let buffer = &for_excerpt.buffer;
@ -5066,7 +5066,7 @@ fn prepaint_gutter_button(
scroll_pixel_position: gpui::Point<Pixels>,
gutter_hitbox: &Hitbox,
rows_with_hunk_bounds: &HashMap<DisplayRow, Bounds<Pixels>>,
cx: &mut WindowContext<'_>,
cx: &mut WindowContext,
) -> AnyElement {
let mut button = button.into_any_element();
let available_space = size(
@ -5099,7 +5099,7 @@ fn render_inline_blame_entry(
blame_entry: BlameEntry,
style: &EditorStyle,
workspace: Option<WeakView<Workspace>>,
cx: &mut WindowContext<'_>,
cx: &mut WindowContext,
) -> AnyElement {
let relative_timestamp = blame_entry_relative_timestamp(&blame_entry);
@ -5139,7 +5139,7 @@ fn render_blame_entry(
style: &EditorStyle,
last_used_color: &mut Option<(PlayerColor, Oid)>,
editor: View<Editor>,
cx: &mut WindowContext<'_>,
cx: &mut WindowContext,
) -> AnyElement {
let mut sha_color = cx
.theme()
@ -5221,7 +5221,7 @@ fn deploy_blame_entry_context_menu(
details: Option<&CommitDetails>,
editor: View<Editor>,
position: gpui::Point<Pixels>,
cx: &mut WindowContext<'_>,
cx: &mut WindowContext,
) {
let context_menu = ContextMenu::build(cx, move |menu, _| {
let sha = format!("{}", blame_entry.sha);