summaryrefslogtreecommitdiffstats
path: root/default-plugins
diff options
context:
space:
mode:
authora-kenji <aks.kenji@protonmail.com>2021-06-29 23:02:51 +0200
committera-kenji <aks.kenji@protonmail.com>2021-06-29 23:02:51 +0200
commitb3b9175081d6e7df02872bff8d530623b8c046f9 (patch)
treee4de583f6a1eaaf8d00a88727a3c0e1b55993c9e /default-plugins
parent3313634fe969a69925a5d32445ba14a5f79e5d87 (diff)
chore(clippy): needless_borrow
Diffstat (limited to 'default-plugins')
-rw-r--r--default-plugins/status-bar/src/second_line.rs6
-rw-r--r--default-plugins/tab-bar/src/line.rs8
2 files changed, 7 insertions, 7 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);
diff --git a/default-plugins/tab-bar/src/line.rs b/default-plugins/tab-bar/src/line.rs
index fce8982da..cad5b7207 100644
--- a/default-plugins/tab-bar/src/line.rs
+++ b/default-plugins/tab-bar/src/line.rs
@@ -21,7 +21,7 @@ fn populate_tabs_in_tab_line(
if tabs_before_active.is_empty() && tabs_after_active.is_empty() {
break;
}
- let current_title_len = get_current_title_len(&tabs_to_render);
+ let current_title_len = get_current_title_len(tabs_to_render);
if current_title_len >= cols {
break;
}
@@ -117,7 +117,7 @@ fn add_previous_tabs_msg(
palette: Palette,
separator: &str,
) {
- while get_current_title_len(&tabs_to_render)
+ while get_current_title_len(tabs_to_render)
+ left_more_message(tabs_before_active.len(), palette, separator).len
>= cols
{
@@ -134,7 +134,7 @@ fn add_next_tabs_msg(
palette: Palette,
separator: &str,
) {
- while get_current_title_len(&title_bar)
+ while get_current_title_len(title_bar)
+ right_more_message(tabs_after_active.len(), palette, separator).len
>= cols
{
@@ -160,7 +160,7 @@ pub fn tab_separator(capabilities: PluginCapabilities) -> &'static str {
if !capabilities.arrow_fonts {
ARROW_SEPARATOR
} else {
- &""
+ ""
}
}