From 372bc427bdc780ae758de0ac261ff1d9e59758f3 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Mon, 29 Jan 2024 23:50:31 -0500 Subject: [PATCH] Fix casing of `OpenZedUrl` action (#7045) This PR updates the casing of the `OpenZedUrl` action to match the [Rust naming guidelines](https://rust-lang.github.io/api-guidelines/naming.html). Release Notes: - N/A --- crates/command_palette/src/command_palette.rs | 4 ++-- crates/zed/src/zed.rs | 4 ++-- crates/zed_actions/src/lib.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/command_palette/src/command_palette.rs b/crates/command_palette/src/command_palette.rs index a130947793..34e2ca38a5 100644 --- a/crates/command_palette/src/command_palette.rs +++ b/crates/command_palette/src/command_palette.rs @@ -18,7 +18,7 @@ use util::{ ResultExt, }; use workspace::{ModalView, Workspace}; -use zed_actions::OpenZedURL; +use zed_actions::OpenZedUrl; actions!(command_palette, [Toggle]); @@ -236,7 +236,7 @@ impl PickerDelegate for CommandPaletteDelegate { if *RELEASE_CHANNEL == ReleaseChannel::Dev { if parse_zed_link(&query).is_some() { intercept_result = Some(CommandInterceptResult { - action: OpenZedURL { url: query.clone() }.boxed_clone(), + action: OpenZedUrl { url: query.clone() }.boxed_clone(), string: query.clone(), positions: vec![], }) diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index 95d3d751b0..86fe95765f 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -38,7 +38,7 @@ use workspace::{ create_and_open_local_file, notifications::simple_message_notification::MessageNotification, open_new, AppState, NewFile, NewWindow, Workspace, WorkspaceSettings, }; -use zed_actions::{OpenBrowser, OpenSettings, OpenZedURL, Quit}; +use zed_actions::{OpenBrowser, OpenSettings, OpenZedUrl, Quit}; actions!( zed, @@ -201,7 +201,7 @@ pub fn initialize_workspace(app_state: Arc, cx: &mut AppContext) { .register_action(|_, _: &ToggleFullScreen, cx| { cx.toggle_full_screen(); }) - .register_action(|_, action: &OpenZedURL, cx| { + .register_action(|_, action: &OpenZedUrl, cx| { cx.global::>() .open_urls(&[action.url.clone()]) }) diff --git a/crates/zed_actions/src/lib.rs b/crates/zed_actions/src/lib.rs index badf76a6e7..9c62e225c7 100644 --- a/crates/zed_actions/src/lib.rs +++ b/crates/zed_actions/src/lib.rs @@ -16,10 +16,10 @@ pub struct OpenBrowser { } #[derive(Clone, PartialEq, Deserialize)] -pub struct OpenZedURL { +pub struct OpenZedUrl { pub url: String, } -impl_actions!(zed, [OpenBrowser, OpenZedURL]); +impl_actions!(zed, [OpenBrowser, OpenZedUrl]); actions!(zed, [OpenSettings, Quit]);