refactor(cli): 🔨 lint issues
This commit is contained in:
parent
d621a0a657
commit
56544deb56
@ -79,7 +79,7 @@ impl App {
|
||||
Event::Render => self.send(Action::Render)?,
|
||||
// Event::Resize(x, y) => self.send(Action::Resize(x, y))?,
|
||||
Event::Key(key) => {
|
||||
if let Some(action) = self.keybindings.get(&vec![key]) {
|
||||
if let Some(action) = self.keybindings.get(&[key]) {
|
||||
self.send(action.clone())?;
|
||||
} else {
|
||||
// If the key was not handled as a single key action,
|
||||
|
||||
@ -21,8 +21,8 @@ impl KeyBindings {
|
||||
let action = Action::from_str(&cmd);
|
||||
|
||||
match action {
|
||||
Ok(action) => (parse_key_sequence(&key_str).unwrap(), action),
|
||||
Err(_) => (parse_key_sequence(&key_str).unwrap(), Action::AppAction(cmd)),
|
||||
Ok(action) => (parse_key_sequence(key_str).unwrap(), action),
|
||||
Err(_) => (parse_key_sequence(key_str).unwrap(), Action::AppAction(cmd)),
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
@ -137,7 +137,7 @@ pub fn key_event_to_string(key_event: &KeyEvent) -> String {
|
||||
char = format!("f({c})");
|
||||
&char
|
||||
}
|
||||
KeyCode::Char(c) if c == ' ' => "space",
|
||||
KeyCode::Char(' ') => "space",
|
||||
KeyCode::Char(c) => {
|
||||
char = c.to_string();
|
||||
&char
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user