Re-implement actions as derive macros instead of blanket impls

This commit is contained in:
Mikayla 2023-11-16 17:32:02 -08:00
parent a0e976599c
commit 4de2c0f7ef
No known key found for this signature in database
22 changed files with 360 additions and 288 deletions

View file

@ -1,4 +1,5 @@
use gpui::action;
use gpui::Action;
use serde::Deserialize;
// If the zed binary doesn't use anything in this crate, it will be optimized away
// and the actions won't initialize. So we just provide an empty initialization function
@ -9,12 +10,12 @@ use gpui::action;
// https://github.com/mmastrac/rust-ctor/issues/280
pub fn init() {}
#[action]
#[derive(Clone, PartialEq, Deserialize, Action)]
pub struct OpenBrowser {
pub url: String,
}
#[action]
#[derive(Clone, PartialEq, Deserialize, Action)]
pub struct OpenZedURL {
pub url: String,
}