From 7dc631de9ac2ef09f3683d1f7020c1cdf6b8c388 Mon Sep 17 00:00:00 2001 From: Nikita Revenco <154856872+NikitaRevenco@users.noreply.github.com> Date: Mon, 17 Feb 2025 22:24:13 +0000 Subject: [PATCH] chore: allow macro to destructure --- helix-term/src/ui/mod.rs | 2 +- helix-term/src/ui/picker.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index f1a9162c9..b79125f82 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -333,7 +333,7 @@ pub fn file_explorer(root: PathBuf, editor: &Editor) -> Result { // TODO: ask user for name of file to be created diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index 4ddeafd3b..ca17feaea 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -1186,7 +1186,7 @@ pub type PickerKeyHandler = HashMap $handler:block),* $(,)?) => { + (|$cx:ident, $item:tt : $t:ty|, $($key:expr => $handler:block),* $(,)?) => { hashmap!( $( $key => Box::new(|$cx: &mut Context, $item: $t| $handler)