fix(clippy): useless use of format!

This commit is contained in:
a-kenji 2021-02-18 15:08:13 +01:00
parent dc7e980a05
commit 12571a115d

View file

@ -283,34 +283,34 @@ pub fn get_help(mode: InputMode) -> Help {
let mut keybinds: Vec<(String, String)> = vec![]; let mut keybinds: Vec<(String, String)> = vec![];
match mode { match mode {
InputMode::Normal | InputMode::Command => { InputMode::Normal | InputMode::Command => {
keybinds.push((format!("p"), format!("PANE"))); keybinds.push(("p".to_string(), "PANE".to_string()));
keybinds.push((format!("t"), format!("TAB"))); keybinds.push(("t".to_string(), "TAB".to_string()));
keybinds.push((format!("r"), format!("RESIZE"))); keybinds.push(("r".to_string(), "RESIZE".to_string()));
keybinds.push((format!("s"), format!("SCROLL"))); keybinds.push(("s".to_string(), "SCROLL".to_string()));
} }
InputMode::Resize => { InputMode::Resize => {
keybinds.push((format!("←↓↑→"), format!("Resize"))); keybinds.push(("←↓↑→".to_string(), "Resize".to_string()));
} }
InputMode::Pane => { InputMode::Pane => {
keybinds.push((format!("←↓↑→"), format!("Move focus"))); keybinds.push(("←↓↑→".to_string(), "Move focus".to_string()));
keybinds.push((format!("p"), format!("Next"))); keybinds.push(("p".to_string(), "Next".to_string()));
keybinds.push((format!("n"), format!("New"))); keybinds.push(("n".to_string(), "New".to_string()));
keybinds.push((format!("d"), format!("Split down"))); keybinds.push(("d".to_string(), "Split down".to_string()));
keybinds.push((format!("r"), format!("Split right"))); keybinds.push(("r".to_string(), "Split right".to_string()));
keybinds.push((format!("x"), format!("Close"))); keybinds.push(("x".to_string(), "Close".to_string()));
keybinds.push((format!("f"), format!("Fullscreen"))); keybinds.push(("f".to_string(), "Fullscreen".to_string()));
} }
InputMode::Tab => { InputMode::Tab => {
keybinds.push((format!("←↓↑→"), format!("Move focus"))); keybinds.push(("←↓↑→".to_string(), "Move focus".to_string()));
keybinds.push((format!("n"), format!("New"))); keybinds.push(("n".to_string(), "New".to_string()));
keybinds.push((format!("x"), format!("Close"))); keybinds.push(("x".to_string(), "Close".to_string()));
} }
InputMode::Scroll => { InputMode::Scroll => {
keybinds.push((format!("↓↑"), format!("Scroll"))); keybinds.push(("↓↑".to_string(), "Scroll".to_string()));
} }
} }
keybinds.push((format!("ESC"), format!("BACK"))); keybinds.push(("ESC".to_string(), "BACK".to_string()));
keybinds.push((format!("q"), format!("QUIT"))); keybinds.push(("q".to_string(), "QUIT".to_string()));
Help { mode, keybinds } Help { mode, keybinds }
} }