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
This commit is contained in:
Marshall Bowers 2024-01-29 23:50:31 -05:00 committed by GitHub
parent 0cb8b0e451
commit 372bc427bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View File

@ -18,7 +18,7 @@ use util::{
ResultExt, ResultExt,
}; };
use workspace::{ModalView, Workspace}; use workspace::{ModalView, Workspace};
use zed_actions::OpenZedURL; use zed_actions::OpenZedUrl;
actions!(command_palette, [Toggle]); actions!(command_palette, [Toggle]);
@ -236,7 +236,7 @@ impl PickerDelegate for CommandPaletteDelegate {
if *RELEASE_CHANNEL == ReleaseChannel::Dev { if *RELEASE_CHANNEL == ReleaseChannel::Dev {
if parse_zed_link(&query).is_some() { if parse_zed_link(&query).is_some() {
intercept_result = Some(CommandInterceptResult { intercept_result = Some(CommandInterceptResult {
action: OpenZedURL { url: query.clone() }.boxed_clone(), action: OpenZedUrl { url: query.clone() }.boxed_clone(),
string: query.clone(), string: query.clone(),
positions: vec![], positions: vec![],
}) })

View File

@ -38,7 +38,7 @@ use workspace::{
create_and_open_local_file, notifications::simple_message_notification::MessageNotification, create_and_open_local_file, notifications::simple_message_notification::MessageNotification,
open_new, AppState, NewFile, NewWindow, Workspace, WorkspaceSettings, open_new, AppState, NewFile, NewWindow, Workspace, WorkspaceSettings,
}; };
use zed_actions::{OpenBrowser, OpenSettings, OpenZedURL, Quit}; use zed_actions::{OpenBrowser, OpenSettings, OpenZedUrl, Quit};
actions!( actions!(
zed, zed,
@ -201,7 +201,7 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
.register_action(|_, _: &ToggleFullScreen, cx| { .register_action(|_, _: &ToggleFullScreen, cx| {
cx.toggle_full_screen(); cx.toggle_full_screen();
}) })
.register_action(|_, action: &OpenZedURL, cx| { .register_action(|_, action: &OpenZedUrl, cx| {
cx.global::<Arc<OpenListener>>() cx.global::<Arc<OpenListener>>()
.open_urls(&[action.url.clone()]) .open_urls(&[action.url.clone()])
}) })

View File

@ -16,10 +16,10 @@ pub struct OpenBrowser {
} }
#[derive(Clone, PartialEq, Deserialize)] #[derive(Clone, PartialEq, Deserialize)]
pub struct OpenZedURL { pub struct OpenZedUrl {
pub url: String, pub url: String,
} }
impl_actions!(zed, [OpenBrowser, OpenZedURL]); impl_actions!(zed, [OpenBrowser, OpenZedUrl]);
actions!(zed, [OpenSettings, Quit]); actions!(zed, [OpenSettings, Quit]);