From 3019960f83e6852a5b9ce3706f88addce3aa2983 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 3 Dec 2024 18:39:00 -0500 Subject: [PATCH] markdown: Make `cx` the last parameter to `Markdown::new_text` (#21497) This PR is a follow-up to https://github.com/zed-industries/zed/pull/21487 to make sure that the `cx` is the last parameter to `Markdown::new_text` as well. Release Notes: - N/A --- crates/editor/src/hover_popover.rs | 2 +- crates/markdown/src/markdown.rs | 2 +- crates/recent_projects/src/ssh_connections.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/editor/src/hover_popover.rs b/crates/editor/src/hover_popover.rs index c402132bf34e9b59cfe0b54227bcacb37bf23428..9cac7dc71357a82bb828efdf03a275aff6c2d677 100644 --- a/crates/editor/src/hover_popover.rs +++ b/crates/editor/src/hover_popover.rs @@ -378,7 +378,7 @@ fn show_hover( }, ..Default::default() }; - Markdown::new_text(text, markdown_style.clone(), None, cx, None) + Markdown::new_text(text, markdown_style.clone(), None, None, cx) }) .ok(); diff --git a/crates/markdown/src/markdown.rs b/crates/markdown/src/markdown.rs index 39217b69305ab7e5952a5aaa1dc60cafdb3e29eb..cdb464877d05413bd416cb51b2f928c487264cba 100644 --- a/crates/markdown/src/markdown.rs +++ b/crates/markdown/src/markdown.rs @@ -97,8 +97,8 @@ impl Markdown { source: String, style: MarkdownStyle, language_registry: Option>, - cx: &ViewContext, fallback_code_block_language: Option, + cx: &ViewContext, ) -> Self { let focus_handle = cx.focus_handle(); let mut this = Self { diff --git a/crates/recent_projects/src/ssh_connections.rs b/crates/recent_projects/src/ssh_connections.rs index a9aeacadd844505bed46740dfa50a3a96cd9d14d..1c084bbf6e97b3b3b08fe37b26f6007112db0399 100644 --- a/crates/recent_projects/src/ssh_connections.rs +++ b/crates/recent_projects/src/ssh_connections.rs @@ -201,7 +201,7 @@ impl SshPrompt { selection_background_color: cx.theme().players().local().selection, ..Default::default() }; - let markdown = cx.new_view(|cx| Markdown::new_text(prompt, markdown_style, None, cx, None)); + let markdown = cx.new_view(|cx| Markdown::new_text(prompt, markdown_style, None, None, cx)); self.prompt = Some((markdown, tx)); self.status_message.take(); cx.focus_view(&self.editor);