From 6f2f7678eb6185c90f505a1ace8b42abe8d4b622 Mon Sep 17 00:00:00 2001 From: graelo Date: Mon, 7 Nov 2022 10:45:06 +0100 Subject: [PATCH 1/3] 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) } From 735d6c0e40e4f8eeb0e79c6cf2968763ad261c54 Mon Sep 17 00:00:00 2001 From: graelo Date: Mon, 7 Nov 2022 10:46:43 +0100 Subject: [PATCH 2/3] fix(test): remove unnecessary &mut in some tests --- src/ui/vc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/vc.rs b/src/ui/vc.rs index a198735..c81c644 100644 --- a/src/ui/vc.rs +++ b/src/ui/vc.rs @@ -1000,7 +1000,7 @@ Barcelona https://en.wikipedia.org/wiki/Barcelona - "; let alphabet = alphabet::Alphabet("abcd".to_string()); let reverse = true; let unique_hint = false; - let mut model = textbuf::Model::new( + let model = textbuf::Model::new( &lines, &alphabet, use_all_patterns, @@ -1026,7 +1026,7 @@ Barcelona https://en.wikipedia.org/wiki/Barcelona - "; let hint_style = None; let ui = ViewController::new( - &mut model, + &model, wrap_around, default_output_destination, &rendering_colors, From 17d090c5b80f5e13aab758a1841512ac14208e15 Mon Sep 17 00:00:00 2001 From: graelo Date: Mon, 7 Nov 2022 12:30:42 +0100 Subject: [PATCH 3/3] fix(github-actions): remove windows support --- .github/workflows/large-scope.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/large-scope.yml b/.github/workflows/large-scope.yml index 73f727c..c5583d3 100644 --- a/.github/workflows/large-scope.yml +++ b/.github/workflows/large-scope.yml @@ -82,9 +82,6 @@ jobs: - os: macos-latest target: aarch64-apple-darwin type: unix - - os: windows-latest - target: x86_64-pc-windows-msvc - type: windows steps: - name: Rust install uses: actions-rs/toolchain@v1