diff options
author | a-kenji <aks.kenji@protonmail.com> | 2021-06-29 23:02:51 +0200 |
---|---|---|
committer | a-kenji <aks.kenji@protonmail.com> | 2021-06-29 23:02:51 +0200 |
commit | b3b9175081d6e7df02872bff8d530623b8c046f9 (patch) | |
tree | e4de583f6a1eaaf8d00a88727a3c0e1b55993c9e /default-plugins/status-bar | |
parent | 3313634fe969a69925a5d32445ba14a5f79e5d87 (diff) |
chore(clippy): needless_borrow
Diffstat (limited to 'default-plugins/status-bar')
-rw-r--r-- | default-plugins/status-bar/src/second_line.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/default-plugins/status-bar/src/second_line.rs b/default-plugins/status-bar/src/second_line.rs index 0861c4646..750df77b6 100644 --- a/default-plugins/status-bar/src/second_line.rs +++ b/default-plugins/status-bar/src/second_line.rs @@ -292,7 +292,7 @@ fn full_shortcut_list(help: &ModeInfo) -> LinePart { _ => { let mut line_part = LinePart::default(); for (i, (letter, description)) in help.keybinds.iter().enumerate() { - let shortcut = full_length_shortcut(i == 0, &letter, &description, help.palette); + let shortcut = full_length_shortcut(i == 0, letter, description, help.palette); line_part.len += shortcut.len; line_part.part = format!("{}{}", line_part.part, shortcut,); } @@ -311,7 +311,7 @@ fn shortened_shortcut_list(help: &ModeInfo) -> LinePart { _ => { let mut line_part = LinePart::default(); for (i, (letter, description)) in help.keybinds.iter().enumerate() { - let shortcut = first_word_shortcut(i == 0, &letter, &description, help.palette); + let shortcut = first_word_shortcut(i == 0, letter, description, help.palette); line_part.len += shortcut.len; line_part.part = format!("{}{}", line_part.part, shortcut,); } @@ -344,7 +344,7 @@ fn best_effort_shortcut_list(help: &ModeInfo, max_len: usize) -> LinePart { _ => { let mut line_part = LinePart::default(); for (i, (letter, description)) in help.keybinds.iter().enumerate() { - let shortcut = first_word_shortcut(i == 0, &letter, &description, help.palette); + let shortcut = first_word_shortcut(i == 0, letter, description, help.palette); if line_part.len + shortcut.len + MORE_MSG.chars().count() > max_len { // TODO: better line_part.part = format!("{}{}", line_part.part, MORE_MSG); |