From 61bb74ebbd16503a385d0345508abb6b0adaf2fb Mon Sep 17 00:00:00 2001 From: denis Date: Sat, 1 May 2021 15:10:21 +0300 Subject: [PATCH] chore: clippy please allow it --- default-plugins/status-bar/src/first_line.rs | 11 ++++------- default-plugins/status-bar/src/main.rs | 3 ++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/default-plugins/status-bar/src/first_line.rs b/default-plugins/status-bar/src/first_line.rs index 02f67c78..77cb4dfc 100644 --- a/default-plugins/status-bar/src/first_line.rs +++ b/default-plugins/status-bar/src/first_line.rs @@ -1,10 +1,7 @@ -use ansi_term::{ANSIStrings, Color::RGB, Style}; +use ansi_term::ANSIStrings; use zellij_tile::prelude::*; -use crate::{ - color_elements, - colors::{BLACK, BRIGHT_GRAY, GRAY, GREEN, RED, WHITE}, -}; +use crate::color_elements; use crate::{ColoredElements, LinePart, ARROW_SEPARATOR}; struct CtrlKeyShortcut { @@ -89,9 +86,9 @@ fn unselected_mode_shortcut(letter: char, text: &str, palette: ColoredElements) fn selected_mode_shortcut(letter: char, text: &str, palette: ColoredElements) -> LinePart { let prefix_separator = palette.selected_prefix_separator.paint(ARROW_SEPARATOR); - let char_left_separator = palette.selected_char_left_separator.paint(format!(" <")); + let char_left_separator = palette.selected_char_left_separator.paint(" <".to_string()); let char_shortcut = palette.selected_char_shortcut.paint(format!("{}", letter)); - let char_right_separator = palette.selected_char_right_separator.paint(format!(">")); + let char_right_separator = palette.selected_char_right_separator.paint(">".to_string()); let styled_text = palette.selected_styled_text.paint(format!("{} ", text)); let suffix_separator = palette.selected_suffix_separator.paint(ARROW_SEPARATOR); LinePart { diff --git a/default-plugins/status-bar/src/main.rs b/default-plugins/status-bar/src/main.rs index 4914efdb..7a8ccebc 100644 --- a/default-plugins/status-bar/src/main.rs +++ b/default-plugins/status-bar/src/main.rs @@ -1,7 +1,7 @@ mod first_line; mod second_line; -use ansi_term::{Color::RGB, Style}; +use ansi_term::Style; use std::fmt::{Display, Error, Formatter}; use zellij_tile::prelude::*; @@ -66,6 +66,7 @@ pub struct ColoredElements { } impl ColoredElements { + #[allow(clippy::too_many_arguments)] pub fn new( selected_prefix_separator: Style, selected_char_left_separator: Style,