keymap: Derive Default for KeyTrieNode

This commit is contained in:
gibbz00 2023-05-31 23:32:55 +02:00 committed by Blaž Hrastnik
parent 78e8695420
commit a56af221d7

View file

@ -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