From a56af221d73d2894ed081b351a0b5a239885ded7 Mon Sep 17 00:00:00 2001 From: gibbz00 Date: Wed, 31 May 2023 23:32:55 +0200 Subject: [PATCH] keymap: Derive `Default` for KeyTrieNode --- helix-term/src/keymap.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs index 3033c6a48..ea34209b1 100644 --- a/helix-term/src/keymap.rs +++ b/helix-term/src/keymap.rs @@ -18,7 +18,7 @@ use std::{ pub use default::default; use macros::key; -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Default)] pub struct KeyTrieNode { /// A label for keys coming under this node, like "Goto mode" name: String, @@ -117,12 +117,6 @@ impl KeyTrieNode { } } -impl Default for KeyTrieNode { - fn default() -> Self { - Self::new("", HashMap::new(), Vec::new()) - } -} - impl PartialEq for KeyTrieNode { fn eq(&self, other: &Self) -> bool { self.map == other.map