keymap: Derive `Default` for KeyTrieNode

pull/7085/merge
gibbz00 2 years ago committed by Blaž Hrastnik
parent 78e8695420
commit a56af221d7

@ -18,7 +18,7 @@ use std::{
pub use default::default; pub use default::default;
use macros::key; use macros::key;
#[derive(Debug, Clone)] #[derive(Debug, Clone, Default)]
pub struct KeyTrieNode { pub struct KeyTrieNode {
/// A label for keys coming under this node, like "Goto mode" /// A label for keys coming under this node, like "Goto mode"
name: String, 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 { impl PartialEq for KeyTrieNode {
fn eq(&self, other: &Self) -> bool { fn eq(&self, other: &Self) -> bool {
self.map == other.map self.map == other.map

Loading…
Cancel
Save