chore: release 1.3.1 (#530) #837
clippy
26 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 26 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.70.0 (90c541806 2023-05-31)
- cargo 1.70.0 (ec8a8a0ca 2023-04-25)
- clippy 0.1.70 (90c5418 2023-05-31)
Annotations
Check warning on line 106 in src/stats/pairhmm/mod.rs
github-actions / clippy
module has the same name as its containing module
warning: module has the same name as its containing module
--> src/stats/pairhmm/mod.rs:106:1
|
106 | mod pairhmm;
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
= note: `#[warn(clippy::module_inception)]` on by default
Check warning on line 65 in src/seq_analysis/orf.rs
github-actions / clippy
casting to the same type is unnecessary (`u8` -> `u8`)
warning: casting to the same type is unnecessary (`u8` -> `u8`)
--> src/seq_analysis/orf.rs:65:44
|
65 | .map(|x| x.iter().map(|&x| x as u8).collect::<VecDeque<u8>>())
| ^^^^^^^ help: try: `x`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 61 in src/seq_analysis/orf.rs
github-actions / clippy
casting to the same type is unnecessary (`u8` -> `u8`)
warning: casting to the same type is unnecessary (`u8` -> `u8`)
--> src/seq_analysis/orf.rs:61:44
|
61 | .map(|x| x.iter().map(|&x| x as u8).collect::<VecDeque<u8>>())
| ^^^^^^^ help: try: `x`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 231 in src/pattern_matching/myers/long.rs
github-actions / clippy
casting to the same type is unnecessary (`i8` -> `i8`)
warning: casting to the same type is unnecessary (`i8` -> `i8`)
--> src/pattern_matching/myers/long.rs:231:28
|
231 | self.add_state(-carry as i8);
| ^^^^^^^^^^^^ help: try: `-carry`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 417 in src/io/fasta.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> src/io/fasta.rs:417:24
|
417 | fs::File::open(&path)
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 374 in src/io/fasta.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> src/io/fasta.rs:374:24
|
374 | fs::File::open(&path)
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 115 in src/io/bed.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> src/io/bed.rs:115:28
|
115 | .serialize(&(&record.chrom, record.start, record.end, &record.aux))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(&record.chrom, record.start, record.end, &record.aux)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 112 in src/io/bed.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> src/io/bed.rs:112:28
|
112 | .serialize(&(&record.chrom, record.start, record.end))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(&record.chrom, record.start, record.end)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
Check warning on line 137 in src/data_structures/wavelet_matrix.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/data_structures/wavelet_matrix.rs:137:22
|
137 | let height = self.height as usize;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `self.height`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 176 in src/data_structures/rank_select.rs
github-actions / clippy
implicitly performing saturating subtraction
warning: implicitly performing saturating subtraction
--> src/data_structures/rank_select.rs:174:9
|
174 | / if superblock > 0 {
175 | | superblock -= 1;
176 | | }
| |_________^ help: try: `superblock = superblock.saturating_sub(1);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub
= note: `#[warn(clippy::implicit_saturating_sub)]` on by default
Check warning on line 100 in src/data_structures/qgram_index.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/data_structures/qgram_index.rs:100:28
|
100 | offset[qgram as usize] += 1;
| ^^^^^^^^^^^^^^ help: try: `qgram`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 99 in src/data_structures/qgram_index.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/data_structures/qgram_index.rs:99:36
|
99 | pos[a + offset[qgram as usize]] = i;
| ^^^^^^^^^^^^^^ help: try: `qgram`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 97 in src/data_structures/qgram_index.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/data_structures/qgram_index.rs:97:28
|
97 | if address[qgram as usize + 1] - a != 0 {
| ^^^^^^^^^^^^^^ help: try: `qgram`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 96 in src/data_structures/qgram_index.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/data_structures/qgram_index.rs:96:33
|
96 | let a = address[qgram as usize];
| ^^^^^^^^^^^^^^ help: try: `qgram`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 74 in src/data_structures/qgram_index.rs
github-actions / clippy
casting to the same type is unnecessary (`u32` -> `u32`)
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> src/data_structures/qgram_index.rs:74:46
|
74 | let qgram_count = alphabet.len().pow(q as u32);
| ^^^^^^^^ help: try: `q`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 202 in src/data_structures/interval_tree/array_backed_interval_tree.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/data_structures/interval_tree/array_backed_interval_tree.rs:202:17
|
202 | let n = self.entries.len() as usize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.entries.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 563 in src/data_structures/fmindex.rs
github-actions / clippy
unsafe function's docs miss `# Safety` section
warning: unsafe function's docs miss `# Safety` section
--> src/data_structures/fmindex.rs:561:5
|
561 | / pub unsafe fn from_fmindex_unchecked(
562 | | fmindex: FMIndex<DBWT, DLess, DOcc>,
563 | | ) -> FMDIndex<DBWT, DLess, DOcc> {
| |____________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
= note: `#[warn(clippy::missing_safety_doc)]` on by default
Check warning on line 181 in src/data_structures/bwt.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/data_structures/bwt.rs:181:9
|
181 | bytecount::count(&bwt[lo_idx + 1..=r], a) as usize + lo_occ
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bytecount::count(&bwt[lo_idx + 1..=r], a)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 174 in src/data_structures/bwt.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/data_structures/bwt.rs:174:37
|
174 | return hi_occ - bytecount::count(&bwt[r + 1..=hi_idx], a) as usize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `bytecount::count(&bwt[r + 1..=hi_idx], a)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 458 in src/alignment/sparse.rs
github-actions / clippy
casting to the same type is unnecessary (`u32` -> `u32`)
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> src/alignment/sparse.rs:455:23
|
455 | let max_inc = (min(
| _______________________^
456 | | seq1.len() as u32 - this_match.0,
457 | | seq2.len() as u32 - this_match.1,
458 | | ) as u32)
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
help: try
|
455 ~ let max_inc = min(
456 + seq1.len() as u32 - this_match.0,
457 + seq2.len() as u32 - this_match.1,
458 + )
|
Check warning on line 320 in src/alignment/poa.rs
github-actions / clippy
using `clone` on type `i32` which implements the `Copy` trait
warning: using `clone` on type `i32` which implements the `Copy` trait
--> src/alignment/poa.rs:320:31
|
320 | weight += edge.weight().clone();
| ^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*edge.weight()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
Check warning on line 319 in src/alignment/poa.rs
github-actions / clippy
this loop could be written as a `for` loop
warning: this loop could be written as a `for` loop
--> src/alignment/poa.rs:319:17
|
319 | while let Some(edge) = edges.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for edge in edges`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
Check warning on line 314 in src/alignment/poa.rs
github-actions / clippy
this loop could be written as a `for` loop
warning: this loop could be written as a `for` loop
--> src/alignment/poa.rs:314:13
|
314 | while let Some(neighbour_node) = neighbour_nodes.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for neighbour_node in neighbour_nodes`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
Check warning on line 1265 in src/alignment/pairwise/banded.rs
github-actions / clippy
casting to the same type is unnecessary (`u32` -> `u32`)
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> src/alignment/pairwise/banded.rs:1265:70
|
1265 | self.add_gap((r as u32, c as u32), (rows as u32, cols as u32), w);
| ^^^^^^^^^^^ help: try: `cols`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 1265 in src/alignment/pairwise/banded.rs
github-actions / clippy
casting to the same type is unnecessary (`u32` -> `u32`)
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> src/alignment/pairwise/banded.rs:1265:57
|
1265 | self.add_gap((r as u32, c as u32), (rows as u32, cols as u32), w);
| ^^^^^^^^^^^ help: try: `rows`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default