config: move parse_keymap to free function
This commit is contained in:
parent
67bba1eed9
commit
518c1ad290
1 changed files with 4 additions and 6 deletions
|
|
@ -9,10 +9,8 @@ impl Keymap {
|
|||
pub fn is_invalid(self) -> bool {
|
||||
self == Self::INVALID
|
||||
}
|
||||
|
||||
pub fn parse(self, keymap: &str) -> Self {
|
||||
let mut res = Self::INVALID;
|
||||
(|| res = get!().parse_keymap(keymap))();
|
||||
res
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parse_keymap(keymap: &str) -> Keymap {
|
||||
get!(Keymap::INVALID).parse_keymap(keymap)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue