Skip to content

Commit

Permalink
Fix clippy error
Browse files Browse the repository at this point in the history
  • Loading branch information
sachaos committed Nov 28, 2024
1 parent 2bba605 commit c2e11da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/termtext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl Converter {
self.style = self.original_style;
}

pub fn convert(&mut self, text: &Vec<u8>) -> Text {
pub fn convert(&mut self, text: &[u8]) -> Text {
let mut statemachine = Parser::<DefaultCharAccumulator>::new();
let mut performer = Converter::new(self.style);

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit c2e11da

Please sign in to comment.