chore: clippy please allow it

This commit is contained in:
denis 2021-05-01 15:10:21 +03:00
parent 0adc914352
commit 61bb74ebbd
2 changed files with 6 additions and 8 deletions

View File

@ -1,10 +1,7 @@
use ansi_term::{ANSIStrings, Color::RGB, Style}; use ansi_term::ANSIStrings;
use zellij_tile::prelude::*; use zellij_tile::prelude::*;
use crate::{ use crate::color_elements;
color_elements,
colors::{BLACK, BRIGHT_GRAY, GRAY, GREEN, RED, WHITE},
};
use crate::{ColoredElements, LinePart, ARROW_SEPARATOR}; use crate::{ColoredElements, LinePart, ARROW_SEPARATOR};
struct CtrlKeyShortcut { 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 { fn selected_mode_shortcut(letter: char, text: &str, palette: ColoredElements) -> LinePart {
let prefix_separator = palette.selected_prefix_separator.paint(ARROW_SEPARATOR); 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_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 styled_text = palette.selected_styled_text.paint(format!("{} ", text));
let suffix_separator = palette.selected_suffix_separator.paint(ARROW_SEPARATOR); let suffix_separator = palette.selected_suffix_separator.paint(ARROW_SEPARATOR);
LinePart { LinePart {

View File

@ -1,7 +1,7 @@
mod first_line; mod first_line;
mod second_line; mod second_line;
use ansi_term::{Color::RGB, Style}; use ansi_term::Style;
use std::fmt::{Display, Error, Formatter}; use std::fmt::{Display, Error, Formatter};
use zellij_tile::prelude::*; use zellij_tile::prelude::*;
@ -66,6 +66,7 @@ pub struct ColoredElements {
} }
impl ColoredElements { impl ColoredElements {
#[allow(clippy::too_many_arguments)]
pub fn new( pub fn new(
selected_prefix_separator: Style, selected_prefix_separator: Style,
selected_char_left_separator: Style, selected_char_left_separator: Style,