aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgibbz002023-06-03 08:46:59 +0000
committerBlaž Hrastnik2023-06-07 01:11:13 +0000
commiteda4c79f2f9e8383bda1ccc995c02223904f8be1 (patch)
tree995714f809be8aa3cf38a43787d50548f1b51285
parent3d0bc720994a404ba316562621dd186e3efe98c5 (diff)
Remove pub keymap.name();
`keymap.name` is only used internally.
-rw-r--r--helix-term/src/keymap.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs
index 973786d5..e0934f76 100644
--- a/helix-term/src/keymap.rs
+++ b/helix-term/src/keymap.rs
@@ -52,10 +52,6 @@ impl KeyTrieNode {
}
}
- pub fn name(&self) -> &str {
- &self.name
- }
-
/// Merge another Node in. Leaves and subnodes from the other node replace
/// corresponding keyevent in self, except when both other and self have
/// subnodes for same key. In that case the merge is recursive.
@@ -86,7 +82,7 @@ impl KeyTrieNode {
}
cmd.doc()
}
- KeyTrie::Node(n) => n.name(),
+ KeyTrie::Node(n) => &n.name,
KeyTrie::Sequence(_) => "[Multiple commands]",
};
match body.iter().position(|(_, d)| d == &desc) {
@@ -110,7 +106,7 @@ impl KeyTrieNode {
(events.join(", "), desc)
})
.collect();
- Info::new(self.name(), &body)
+ Info::new(&self.name, &body)
}
}