diff options
author | gibbz00 | 2023-05-31 21:32:55 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-06-07 01:11:13 +0000 |
commit | a56af221d73d2894ed081b351a0b5a239885ded7 (patch) | |
tree | b31b9325eeb8365398e3aefa086b5f3fdbe249fb | |
parent | 78e869542022638af482c0dd85a07086a942907a (diff) |
keymap: Derive `Default` for KeyTrieNode
-rw-r--r-- | helix-term/src/keymap.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs index 3033c6a4..ea34209b 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 |