fix(clippy): use of unwrap_or followed by a fn

use of `unwrap_or` followed by a function call
This commit is contained in:
a-kenji 2021-02-18 21:46:16 +01:00
parent fc1a956040
commit 6bb419661e

View file

@ -172,7 +172,7 @@ pub fn key_to_actions(
// FIXME in command mode, unbound keystrokes should probably do nothing instead of // FIXME in command mode, unbound keystrokes should probably do nothing instead of
// writing to the terminal. Will be easier to implement after a big refactor of the // writing to the terminal. Will be easier to implement after a big refactor of the
// input system (@categorille) // input system (@categorille)
.unwrap_or(vec![Action::Write(input)]) .unwrap_or_else(|| vec![Action::Write(input)])
} else { } else {
unreachable!("Unrecognized mode: {:?}", mode); unreachable!("Unrecognized mode: {:?}", mode);
} }