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

@ -81,13 +81,12 @@ pub use stories::*;
mod stories {
use super::*;
use crate::Story;
use gpui::{action, Div, Render};
use gpui::{actions, Div, Render};
use itertools::Itertools;
pub struct KeybindingStory;
#[action]
struct NoAction {}
actions!(NoAction);
pub fn binding(key: &str) -> gpui::KeyBinding {
gpui::KeyBinding::new(key, NoAction {}, None)