mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-09 20:04:25 +00:00
This commit mostly fixes invalid URLs in docstrings. It also encapsulates crates we reexport (serde stuff + linkme) into a public module named "private" in order to reduce the API surfaced through docs. Moreover, I fixed up a bunch of crates that were pulling serde_json in through gpui explicitly instead of using Cargo manifest. Release Notes: - N/A
50 lines
1.1 KiB
Rust
50 lines
1.1 KiB
Rust
use gpui::{actions, impl_actions};
|
|
use gpui_macros::register_action;
|
|
use serde_derive::Deserialize;
|
|
|
|
#[test]
|
|
fn test_action_macros() {
|
|
actions!(test, [TestAction]);
|
|
|
|
#[derive(PartialEq, Clone, Deserialize)]
|
|
struct AnotherTestAction;
|
|
|
|
impl_actions!(test, [AnotherTestAction]);
|
|
|
|
#[derive(PartialEq, Clone, gpui::private::serde_derive::Deserialize)]
|
|
struct RegisterableAction {}
|
|
|
|
register_action!(RegisterableAction);
|
|
|
|
impl gpui::Action for RegisterableAction {
|
|
fn boxed_clone(&self) -> Box<dyn gpui::Action> {
|
|
todo!()
|
|
}
|
|
|
|
fn as_any(&self) -> &dyn std::any::Any {
|
|
todo!()
|
|
}
|
|
|
|
fn partial_eq(&self, _action: &dyn gpui::Action) -> bool {
|
|
todo!()
|
|
}
|
|
|
|
fn name(&self) -> &str {
|
|
todo!()
|
|
}
|
|
|
|
fn debug_name() -> &'static str
|
|
where
|
|
Self: Sized,
|
|
{
|
|
todo!()
|
|
}
|
|
|
|
fn build(_value: serde_json::Value) -> anyhow::Result<Box<dyn gpui::Action>>
|
|
where
|
|
Self: Sized,
|
|
{
|
|
todo!()
|
|
}
|
|
}
|
|
}
|