From c2e11da379ffa5ec1090613fd863854823684838 Mon Sep 17 00:00:00 2001 From: Takumasa Sakao Date: Fri, 29 Nov 2024 08:42:50 +0900 Subject: [PATCH] Fix clippy error --- src/termtext.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/termtext.rs b/src/termtext.rs index b86c5ed..25c0ba5 100644 --- a/src/termtext.rs +++ b/src/termtext.rs @@ -124,7 +124,7 @@ impl Converter { self.style = self.original_style; } - pub fn convert(&mut self, text: &Vec) -> Text { + pub fn convert(&mut self, text: &[u8]) -> Text { let mut statemachine = Parser::::new(); let mut performer = Converter::new(self.style); @@ -180,7 +180,7 @@ impl Perform for Converter { return; } - let is_sgr = byte == b'm' && intermediates.first().is_none(); + let is_sgr = byte == b'm' && intermediates.is_empty(); let style = if is_sgr { if params.is_empty() { self.reset_style();