diff options
| author | Marcin Puc <5671049+tranzystorek-io@users.noreply.github.com> | 2021-12-07 11:24:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-07 10:24:42 +0000 |
| commit | 56e85f87d6c365816cca71c496aa7e49709e0b11 (patch) | |
| tree | 1dbc6db878e8da9544df9445d77d1cd665b9126b /zellij-utils/src/input/keybinds.rs | |
| parent | docs(changelog): fix resize performance (diff) | |
| download | sl0ppij-56e85f87d6c365816cca71c496aa7e49709e0b11.tar.gz sl0ppij-56e85f87d6c365816cca71c496aa7e49709e0b11.tar.xz sl0ppij-56e85f87d6c365816cca71c496aa7e49709e0b11.zip | |
fix(style): various internal refactorings
Diffstat (limited to 'zellij-utils/src/input/keybinds.rs')
| -rw-r--r-- | zellij-utils/src/input/keybinds.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zellij-utils/src/input/keybinds.rs b/zellij-utils/src/input/keybinds.rs index e3f88b1a..fcc2e4a8 100644 --- a/zellij-utils/src/input/keybinds.rs +++ b/zellij-utils/src/input/keybinds.rs @@ -109,7 +109,7 @@ impl Keybinds { for mode in InputMode::iter() { if let Some(keybinds) = keybinds_from_yaml.get(&mode) { - for keybind in keybinds.iter() { + for keybind in keybinds { match keybind { KeyActionUnbind::Unbind(unbind) => { unbind_config.insert(mode, unbind.unbind.clone()); @@ -242,8 +242,8 @@ impl From<KeybindsFromYaml> for Keybinds { for mode in InputMode::iter() { let mut mode_keybinds = ModeKeybinds::new(); - for key_action in keybinds_from_yaml.keybinds.get(&mode).iter() { - for keybind in key_action.iter() { + if let Some(key_action) = keybinds_from_yaml.keybinds.get(&mode) { + for keybind in key_action { mode_keybinds = mode_keybinds.merge(ModeKeybinds::from(keybind.clone())); } } |
