From 6f2f7678eb6185c90f505a1ace8b42abe8d4b622 Mon Sep 17 00:00:00 2001 From: graelo Date: Mon, 7 Nov 2022 10:45:06 +0100 Subject: [PATCH] chore(clippy): obey nightly clippy --- src/textbuf/model.rs | 4 ++-- src/ui/vc.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/textbuf/model.rs b/src/textbuf/model.rs index b4e64a4..05d8b29 100644 --- a/src/textbuf/model.rs +++ b/src/textbuf/model.rs @@ -113,7 +113,7 @@ fn find_raw_spans<'a>( // the start and end byte indices with respect to the chunk. let chunk_matches = all_regexes .iter() - .filter_map(|(&ref pat_name, reg)| { + .filter_map(|(pat_name, reg)| { reg.find_iter(chunk) .next() .map(|reg_match| (pat_name, reg, reg_match)) @@ -131,7 +131,7 @@ fn find_raw_spans<'a>( .unwrap(); // Never hint or break ansi color sequences. - if *pat_name != "ansi_colors" { + if **pat_name != "ansi_colors" { let text = reg_match.as_str(); // All patterns must have a capturing group: try obtaining diff --git a/src/ui/vc.rs b/src/ui/vc.rs index b19b54d..a198735 100644 --- a/src/ui/vc.rs +++ b/src/ui/vc.rs @@ -117,7 +117,7 @@ impl<'a> ViewController<'a> { let line_width = self.term_width as usize; let new_pos_x = pos_x % line_width; - let new_pos_y = self.wrapped_lines[pos_y as usize].pos_y + pos_x / line_width; + let new_pos_y = self.wrapped_lines[pos_y].pos_y + pos_x / line_width; (new_pos_x, new_pos_y) }