Made skalo command commensurable with the file input logic that runs … #255
Annotations
87 warnings
missing documentation for a function:
src/skalo_utils.rs#L286
warning: missing documentation for a function
--> src/skalo_utils.rs:286:1
|
286 | pub fn convert_combined(input: &str, k: usize) -> Result<String, String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a function:
src/skalo_utils.rs#L278
warning: missing documentation for a function
--> src/skalo_utils.rs:278:1
|
278 | pub fn count_occurrences(vec: &Vec<u32>) -> HashMap<u32, i32> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a function:
src/skalo_utils.rs#L271
warning: missing documentation for a function
--> src/skalo_utils.rs:271:1
|
271 | pub fn jaccard_similarity(set1: &HashSet<&str>, set2: &HashSet<&str>) -> f32 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a function:
src/skalo_utils.rs#L250
warning: missing documentation for a function
--> src/skalo_utils.rs:250:1
|
250 | pub fn check_homopolymer(limit_n: u32, first_kmer: String, l_middle_bases: Vec<String>) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a function:
src/skalo_utils.rs#L230
warning: missing documentation for a function
--> src/skalo_utils.rs:230:1
|
230 | pub fn test_multiple_positions(l_middles: Vec<String>, last_kmer: String) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a function:
src/skalo_utils.rs#L160
warning: missing documentation for a function
--> src/skalo_utils.rs:160:1
|
160 | / pub fn collect_middle_bases(
161 | | vec_variants: Vec<VariantInfo>,
162 | | len_k_graph: usize,
163 | | use_rev_complement: bool,
164 | | ) -> (Vec<String>, String) {
| |__________________________^
|
missing documentation for a function:
src/skalo_utils.rs#L140
warning: missing documentation for a function
--> src/skalo_utils.rs:140:1
|
140 | pub fn calculate_ratio_missing(nb_total: usize, vec_variants: Vec<VariantInfo>) -> f32 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a function:
src/skalo_utils.rs#L131
warning: missing documentation for a function
--> src/skalo_utils.rs:131:1
|
131 | pub fn compare_samples(str_1: &str, str_2: &str) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for an associated function:
src/skalo_utils.rs#L110
warning: missing documentation for an associated function
--> src/skalo_utils.rs:110:5
|
110 | / pub fn new(
111 | | //entry_kmer: u128,
112 | | //exit_kmer: u128,
113 | | sequence: String,
... |
117 | | maj_samples: HashSet<&'a str>,
118 | | ) -> Self {
| |_____________^
|
missing documentation for a struct field:
src/skalo_utils.rs#L106
warning: missing documentation for a struct field
--> src/skalo_utils.rs:106:5
|
106 | pub maj_samples: HashSet<&'a str>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/skalo_utils.rs#L105
warning: missing documentation for a struct field
--> src/skalo_utils.rs:105:5
|
105 | pub count_samples: HashMap<&'a str, i32>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/skalo_utils.rs#L104
warning: missing documentation for a struct field
--> src/skalo_utils.rs:104:5
|
104 | pub visited_nodes: HashSet<u128>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/skalo_utils.rs#L103
warning: missing documentation for a struct field
--> src/skalo_utils.rs:103:5
|
103 | pub is_snp: bool,
| ^^^^^^^^^^^^^^^^
|
missing documentation for a struct field:
src/skalo_utils.rs#L102
warning: missing documentation for a struct field
--> src/skalo_utils.rs:102:5
|
102 | pub sequence: String,
| ^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a function:
src/skalo_utils.rs#L83
warning: missing documentation for a function
--> src/skalo_utils.rs:83:1
|
83 | pub fn get_last_nucleotide(encoded_kmer: u128) -> char {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a function:
src/skalo_utils.rs#L67
warning: missing documentation for a function
--> src/skalo_utils.rs:67:1
|
67 | pub fn decode_kmer_skalo(encoded: u128, k: usize) -> String {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a function:
src/skalo_utils.rs#L44
warning: missing documentation for a function
--> src/skalo_utils.rs:44:1
|
44 | pub fn encode_kmer(kmer: &str) -> u128 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a function:
src/skalo_utils.rs#L17
warning: missing documentation for a function
--> src/skalo_utils.rs:17:1
|
17 | pub fn rev_compl_u128(kmer: u128, k: usize) -> u128 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
missing documentation for a function:
src/skalo.rs#L412
warning: missing documentation for a function
--> src/skalo.rs:412:1
|
412 | / pub fn filter_output_sequences(
413 | | variant_groups: HashMap<String, Vec<VariantInfo>>,
414 | | len_kmer: usize,
415 | | all_samples: Vec<String>,
... |
419 | | input_name: &str,
420 | | ) {
| |_^
|
missing documentation for a function:
src/skalo.rs#L187
warning: missing documentation for a function
--> src/skalo.rs:187:1
|
187 | / pub fn build_sequences<'a>(
188 | | len_kmer: usize,
189 | | all_kmers: &HashMap<u128, HashMap<u128, u32>>,
190 | | start_kmers: &HashSet<u128>,
191 | | end_kmers: &HashSet<u128>,
192 | | index_map: &'a HashMap<u32, String>,
193 | | ) -> HashMap<String, Vec<VariantInfo<'a>>> {
| |__________________________________________^
|
missing documentation for a function:
src/skalo.rs#L136
warning: missing documentation for a function
--> src/skalo.rs:136:1
|
136 | / pub fn identify_good_kmers(
137 | | len_kmer: usize,
138 | | all_kmers: &HashMap<u128, HashMap<u128, u32>>,
139 | | index_map: &HashMap<u32, String>,
140 | | ) -> (HashSet<u128>, HashSet<u128>) {
| |___________________________________^
|
missing documentation for a module:
src/lib.rs#L435
warning: missing documentation for a module
--> src/lib.rs:435:1
|
435 | pub mod skalo_utils;
| ^^^^^^^^^^^^^^^^^^^
|
missing documentation for a module:
src/lib.rs#L434
warning: missing documentation for a module
--> src/lib.rs:434:1
|
434 | pub mod skalo;
| ^^^^^^^^^^^^^
|
note: the lint level is defined here
--> src/lib.rs:406:9
|
406 | #![warn(missing_docs)]
| ^^^^^^^^^^^^
|
casting to the same type is unnecessary (`f32` -> `f32`):
src/skalo_utils.rs#L274
warning: casting to the same type is unnecessary (`f32` -> `f32`)
--> src/skalo_utils.rs:274:22
|
274 | let union_size = (set1.len() as f32 + set2.len() as f32 - intersection_size) as f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(set1.len() as f32 + set2.len() as f32 - intersection_size)`
|
= 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
|
comparison to empty slice:
src/skalo_utils.rs#L221
warning: comparison to empty slice
--> src/skalo_utils.rs:221:12
|
221 | if middle_bases == "" {
| ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `middle_bases.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
= note: `#[warn(clippy::comparison_to_empty)]` on by default
|
returning the result of a `let` binding from a block:
src/skalo_utils.rs#L157
warning: returning the result of a `let` binding from a block
--> src/skalo_utils.rs:157:5
|
156 | let ratio_missing = missing_samples / nb_total as f32;
| ------------------------------------------------------ unnecessary `let` binding
157 | ratio_missing
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
156 ~
157 ~ missing_samples / nb_total as f32
|
|
the variable `state` is used as a loop counter:
src/skalo.rs#L546
warning: the variable `state` is used as a loop counter
--> src/skalo.rs:546:21
|
546 | for variant in vec_variants.iter().take(2) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (state, variant) in vec_variants.iter().take(2).enumerate()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop
= note: `#[warn(clippy::explicit_counter_loop)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
src/skalo.rs#L313
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/skalo.rs:313:56
|
313 | ... majrule_samples.insert(&sample);
| ^^^^^^^ help: change this to: `sample`
|
= 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
|
using `clone` on type `u128` which implements the `Copy` trait:
src/skalo.rs#L290
warning: using `clone` on type `u128` which implements the `Copy` trait
--> src/skalo.rs:290:37
|
290 | previous_kmer = good_next[0].clone();
| ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `good_next[0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `u128` which implements the `Copy` trait:
src/skalo.rs#L271
warning: using `clone` on type `u128` which implements the `Copy` trait
--> src/skalo.rs:271:48
|
271 | ... good_next.push(kmer2.clone());
| ^^^^^^^^^^^^^ help: try removing the `clone` call: `kmer2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `u128` which implements the `Copy` trait:
src/skalo.rs#L268
warning: using `clone` on type `u128` which implements the `Copy` trait
--> src/skalo.rs:268:48
|
268 | ... good_next.push(kmer2.clone());
| ^^^^^^^^^^^^^ help: try removing the `clone` call: `kmer2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `u128` which implements the `Copy` trait:
src/skalo.rs#L251
warning: using `clone` on type `u128` which implements the `Copy` trait
--> src/skalo.rs:251:48
|
251 | ... kmer2_to_test.push(kmer2.clone());
| ^^^^^^^^^^^^^ help: try dereferencing it: `*kmer2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `u128` which implements the `Copy` trait:
src/skalo.rs#L235
warning: using `clone` on type `u128` which implements the `Copy` trait
--> src/skalo.rs:235:43
|
235 | let mut previous_kmer: u128 = next_kmer.clone();
| ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*next_kmer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `u128` which implements the `Copy` trait:
src/skalo.rs#L233
warning: using `clone` on type `u128` which implements the `Copy` trait
--> src/skalo.rs:233:28
|
233 | visited.insert(next_kmer.clone());
| ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*next_kmer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `u128` which implements the `Copy` trait:
src/skalo.rs#L232
warning: using `clone` on type `u128` which implements the `Copy` trait
--> src/skalo.rs:232:28
|
232 | visited.insert(kmer.clone());
| ^^^^^^^^^^^^ help: try dereferencing it: `*kmer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `u128` which implements the `Copy` trait:
src/skalo.rs#L214
warning: using `clone` on type `u128` which implements the `Copy` trait
--> src/skalo.rs:214:49
|
214 | let next_nucl = get_last_nucleotide(next_kmer.clone());
| ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*next_kmer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `u128` which implements the `Copy` trait:
src/skalo.rs#L213
warning: using `clone` on type `u128` which implements the `Copy` trait
--> src/skalo.rs:213:50
|
213 | let mut sequence = decode_kmer_skalo(kmer.clone(), len_kmer_graph);
| ^^^^^^^^^^^^ help: try dereferencing it: `*kmer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `u128` which implements the `Copy` trait:
src/skalo.rs#L160
warning: using `clone` on type `u128` which implements the `Copy` trait
--> src/skalo.rs:160:53
|
160 | let dna = decode_kmer_skalo(kmer.clone(), len_kmer_graph);
| ^^^^^^^^^^^^ help: try dereferencing it: `*kmer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `u128` which implements the `Copy` trait:
src/skalo.rs#L158
warning: using `clone` on type `u128` which implements the `Copy` trait
--> src/skalo.rs:158:44
|
158 | start_kmers.insert(kmer.clone());
| ^^^^^^^^^^^^ help: try dereferencing it: `*kmer`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
unnecessary use of `to_string`:
src/skalo.rs#L109
warning: unnecessary use of `to_string`
--> src/skalo.rs:109:53
|
109 | let rc_encoded_kmer_2 = encode_kmer(&rc_kmer[1..].to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&rc_kmer[1..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
|
unnecessary use of `to_string`:
src/skalo.rs#L108
warning: unnecessary use of `to_string`
--> src/skalo.rs:108:53
|
108 | let rc_encoded_kmer_1 = encode_kmer(&rc_kmer[..full_kmer.len() - 1].to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&rc_kmer[..full_kmer.len() - 1]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
|
using `clone` on type `u32` which implements the `Copy` trait:
src/skalo.rs#L105
warning: using `clone` on type `u32` which implements the `Copy` trait
--> src/skalo.rs:105:45
|
105 | .insert(encoded_kmer_2, value_index.clone());
| ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `value_index`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
unnecessary use of `to_string`:
src/skalo.rs#L97
warning: unnecessary use of `to_string`
--> src/skalo.rs:97:50
|
97 | let encoded_kmer_2 = encode_kmer(&full_kmer[1..].to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&full_kmer[1..]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
|
unnecessary use of `to_string`:
src/skalo.rs#L96
warning: unnecessary use of `to_string`
--> src/skalo.rs:96:50
|
96 | let encoded_kmer_1 = encode_kmer(&full_kmer[..full_kmer.len() - 1].to_string());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&full_kmer[..full_kmer.len() - 1]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
= note: `#[warn(clippy::unnecessary_to_owned)]` on by default
|
using `clone` on type `u32` which implements the `Copy` trait:
src/skalo.rs#L90
warning: using `clone` on type `u32` which implements the `Copy` trait
--> src/skalo.rs:90:38
|
90 | index_map.insert(value_index.clone(), str_sample_id.to_string());
| ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `value_index`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `u32` which implements the `Copy` trait:
src/skalo.rs#L89
warning: using `clone` on type `u32` which implements the `Copy` trait
--> src/skalo.rs:89:67
|
89 | all_indexes.insert(str_sample_id.to_string(), value_index.clone());
| ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `value_index`
|
= 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
|
very complex type used. Consider factoring parts into `type` definitions:
src/skalo.rs#L16
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/skalo.rs:16:6
|
16 | ) -> (
| ______^
17 | | usize,
18 | | Vec<String>,
19 | | HashMap<u128, HashMap<u128, u32>>,
20 | | HashMap<u32, String>,
21 | | ) {
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
|
the following explicit lifetimes could be elided: 'a:
src/merge_ska_array.rs#L628
warning: the following explicit lifetimes could be elided: 'a
--> src/merge_ska_array.rs:628:6
|
628 | impl<'a, IntT> Iterator for KmerIter<'a, IntT>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
628 - impl<'a, IntT> Iterator for KmerIter<'a, IntT>
628 + impl<IntT> Iterator for KmerIter<'_, IntT>
|
|
empty line after doc comment:
src/ska_ref.rs#L110
warning: empty line after doc comment
--> src/ska_ref.rs:110:5
|
110 | / /// Mapping information
111 | |
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
= help: if the empty line is unintentional remove it
help: if the documentation should include the empty line include it in the comment
|
111 | ///
|
|
empty line after doc comment:
src/ska_ref.rs#L101
warning: empty line after doc comment
--> src/ska_ref.rs:101:5
|
101 | / /// Input sequence
102 | |
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
= note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
= help: if the empty line is unintentional remove it
help: if the documentation should include the empty line include it in the comment
|
102 | ///
|
|
the following explicit lifetimes could be elided: 'a:
src/ska_ref/idx_check.rs#L50
warning: the following explicit lifetimes could be elided: 'a
--> src/ska_ref/idx_check.rs:50:6
|
50 | impl<'a> Iterator for IdxCheckIter<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
50 - impl<'a> Iterator for IdxCheckIter<'a> {
50 + impl Iterator for IdxCheckIter<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
src/ska_dict/bit_encoding.rs#L185
warning: the following explicit lifetimes could be elided: 'a
--> src/ska_dict/bit_encoding.rs:185:6
|
185 | impl<'a> UInt<'a> for u128 {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
185 - impl<'a> UInt<'a> for u128 {
185 + impl UInt<'_> for u128 {
|
|
the following explicit lifetimes could be elided: 'a:
src/ska_dict/bit_encoding.rs#L127
warning: the following explicit lifetimes could be elided: 'a
--> src/ska_dict/bit_encoding.rs:127:6
|
127 | impl<'a> UInt<'a> for u64 {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
127 - impl<'a> UInt<'a> for u64 {
127 + impl UInt<'_> for u64 {
|
|
unused import: `hashbrown::HashMap`:
src/io_utils.rs#L17
warning: unused import: `hashbrown::HashMap`
--> src/io_utils.rs:17:5
|
17 | use hashbrown::HashMap;
| ^^^^^^^^^^^^^^^^^^
|
unused import: `decode_kmer`:
src/io_utils.rs#L16
warning: unused import: `decode_kmer`
--> src/io_utils.rs:16:37
|
16 | use crate::ska_dict::bit_encoding::{decode_kmer, UInt};
| ^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
operator precedence can trip the unwary:
src/ska_dict/bloom_filter.rs#L63
warning: operator precedence can trip the unwary
--> src/ska_dict/bloom_filter.rs:63:9
|
63 | / 1 << (key & 63)
64 | | | 1 << ((key >> 6) & 63)
| |____________________________________^ help: consider parenthesizing your expression: `(1 << (key & 63)) | (1 << ((key >> 6) & 63))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bloom_filter.rs#L63
warning: operator precedence can trip the unwary
--> src/ska_dict/bloom_filter.rs:63:9
|
63 | / 1 << (key & 63)
64 | | | 1 << ((key >> 6) & 63)
65 | | | 1 << ((key >> 12) & 63)
| |_____________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
help: consider parenthesizing your expression
|
63 ~ 1 << (key & 63)
64 + | 1 << ((key >> 6) & 63) | (1 << ((key >> 12) & 63))
|
|
operator precedence can trip the unwary:
src/ska_dict/bloom_filter.rs#L63
warning: operator precedence can trip the unwary
--> src/ska_dict/bloom_filter.rs:63:9
|
63 | / 1 << (key & 63)
64 | | | 1 << ((key >> 6) & 63)
65 | | | 1 << ((key >> 12) & 63)
66 | | | 1 << ((key >> 18) & 63)
| |_____________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
help: consider parenthesizing your expression
|
63 ~ 1 << (key & 63)
64 + | 1 << ((key >> 6) & 63)
65 + | 1 << ((key >> 12) & 63) | (1 << ((key >> 18) & 63))
|
|
operator precedence can trip the unwary:
src/ska_dict/bloom_filter.rs#L63
warning: operator precedence can trip the unwary
--> src/ska_dict/bloom_filter.rs:63:9
|
63 | / 1 << (key & 63)
64 | | | 1 << ((key >> 6) & 63)
65 | | | 1 << ((key >> 12) & 63)
66 | | | 1 << ((key >> 18) & 63)
67 | | | 1 << ((key >> 24) & 63)
| |_____________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
help: consider parenthesizing your expression
|
63 ~ 1 << (key & 63)
64 + | 1 << ((key >> 6) & 63)
65 + | 1 << ((key >> 12) & 63)
66 + | 1 << ((key >> 18) & 63) | (1 << ((key >> 24) & 63))
|
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L200
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:200:17
|
200 | self = (self >> 64 & 0x0000000000000000FFFFFFFFFFFFFFFF)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 64) & 0x0000000000000000FFFFFFFFFFFFFFFF`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L200
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:200:16
|
200 | self = (self >> 64 & 0x0000000000000000FFFFFFFFFFFFFFFF)
| ________________^
201 | | | (self & 0x0000000000000000FFFFFFFFFFFFFFFF) << 64;
| |_______________________________________________________________^ help: consider parenthesizing your expression: `(self >> 64 & 0x0000000000000000FFFFFFFFFFFFFFFF) | ((self & 0x0000000000000000FFFFFFFFFFFFFFFF) << 64)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L198
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:198:17
|
198 | self = (self >> 32 & 0x00000000FFFFFFFF00000000FFFFFFFF)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L198
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:198:16
|
198 | self = (self >> 32 & 0x00000000FFFFFFFF00000000FFFFFFFF)
| ________________^
199 | | | (self & 0x00000000FFFFFFFF00000000FFFFFFFF) << 32;
| |_______________________________________________________________^ help: consider parenthesizing your expression: `(self >> 32 & 0x00000000FFFFFFFF00000000FFFFFFFF) | ((self & 0x00000000FFFFFFFF00000000FFFFFFFF) << 32)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L196
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:196:17
|
196 | self = (self >> 16 & 0x0000FFFF0000FFFF0000FFFF0000FFFF)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L196
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:196:16
|
196 | self = (self >> 16 & 0x0000FFFF0000FFFF0000FFFF0000FFFF)
| ________________^
197 | | | (self & 0x0000FFFF0000FFFF0000FFFF0000FFFF) << 16;
| |_______________________________________________________________^ help: consider parenthesizing your expression: `(self >> 16 & 0x0000FFFF0000FFFF0000FFFF0000FFFF) | ((self & 0x0000FFFF0000FFFF0000FFFF0000FFFF) << 16)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L194
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:194:17
|
194 | self = (self >> 8 & 0x00FF00FF00FF00FF00FF00FF00FF00FF)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L194
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:194:16
|
194 | self = (self >> 8 & 0x00FF00FF00FF00FF00FF00FF00FF00FF)
| ________________^
195 | | | (self & 0x00FF00FF00FF00FF00FF00FF00FF00FF) << 8;
| |______________________________________________________________^ help: consider parenthesizing your expression: `(self >> 8 & 0x00FF00FF00FF00FF00FF00FF00FF00FF) | ((self & 0x00FF00FF00FF00FF00FF00FF00FF00FF) << 8)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L192
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:192:17
|
192 | self = (self >> 4 & 0x0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 4) & 0x0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L192
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:192:16
|
192 | self = (self >> 4 & 0x0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F)
| ________________^
193 | | | (self & 0x0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F) << 4;
| |______________________________________________________________^ help: consider parenthesizing your expression: `(self >> 4 & 0x0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F) | ((self & 0x0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F) << 4)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L190
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:190:17
|
190 | self = (self >> 2 & 0x33333333333333333333333333333333)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 2) & 0x33333333333333333333333333333333`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L190
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:190:16
|
190 | self = (self >> 2 & 0x33333333333333333333333333333333)
| ________________^
191 | | | (self & 0x33333333333333333333333333333333) << 2;
| |______________________________________________________________^ help: consider parenthesizing your expression: `(self >> 2 & 0x33333333333333333333333333333333) | ((self & 0x33333333333333333333333333333333) << 2)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L136
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:136:17
|
136 | self = (self >> 32 & 0x00000000FFFFFFFF) | (self & 0x00000000FFFFFFFF) << 32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 32) & 0x00000000FFFFFFFF`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L136
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:136:16
|
136 | self = (self >> 32 & 0x00000000FFFFFFFF) | (self & 0x00000000FFFFFFFF) << 32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 32 & 0x00000000FFFFFFFF) | ((self & 0x00000000FFFFFFFF) << 32)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L135
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:135:17
|
135 | self = (self >> 16 & 0x0000FFFF0000FFFF) | (self & 0x0000FFFF0000FFFF) << 16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 16) & 0x0000FFFF0000FFFF`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L135
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:135:16
|
135 | self = (self >> 16 & 0x0000FFFF0000FFFF) | (self & 0x0000FFFF0000FFFF) << 16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 16 & 0x0000FFFF0000FFFF) | ((self & 0x0000FFFF0000FFFF) << 16)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L134
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:134:17
|
134 | self = (self >> 8 & 0x00FF00FF00FF00FF) | (self & 0x00FF00FF00FF00FF) << 8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 8) & 0x00FF00FF00FF00FF`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L134
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:134:16
|
134 | self = (self >> 8 & 0x00FF00FF00FF00FF) | (self & 0x00FF00FF00FF00FF) << 8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 8 & 0x00FF00FF00FF00FF) | ((self & 0x00FF00FF00FF00FF) << 8)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L133
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:133:17
|
133 | self = (self >> 4 & 0x0F0F0F0F0F0F0F0F) | (self & 0x0F0F0F0F0F0F0F0F) << 4;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 4) & 0x0F0F0F0F0F0F0F0F`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L133
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:133:16
|
133 | self = (self >> 4 & 0x0F0F0F0F0F0F0F0F) | (self & 0x0F0F0F0F0F0F0F0F) << 4;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 4 & 0x0F0F0F0F0F0F0F0F) | ((self & 0x0F0F0F0F0F0F0F0F) << 4)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L132
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:132:17
|
132 | self = (self >> 2 & 0x3333333333333333) | (self & 0x3333333333333333) << 2;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 2) & 0x3333333333333333`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/bit_encoding.rs#L132
warning: operator precedence can trip the unwary
--> src/ska_dict/bit_encoding.rs:132:16
|
132 | self = (self >> 2 & 0x3333333333333333) | (self & 0x3333333333333333) << 2;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(self >> 2 & 0x3333333333333333) | ((self & 0x3333333333333333) << 2)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/split_kmer.rs#L210
warning: operator precedence can trip the unwary
--> src/ska_dict/split_kmer.rs:210:34
|
210 | self.rc_upper = (self.rc_upper >> 2
| __________________________________^
211 | | | (IntT::from_encoded_base(rc_base(new_base))) << (2 * ((half_k * 2) - 1)))
| |______________________________________________________________________________________________^ help: consider parenthesizing your expression: `(self.rc_upper >> 2) | ((IntT::from_encoded_base(rc_base(new_base))) << (2 * ((half_k * 2) - 1)))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/split_kmer.rs#L206
warning: operator precedence can trip the unwary
--> src/ska_dict/split_kmer.rs:206:34
|
206 | self.rc_lower = (self.rc_lower >> 2
| __________________________________^
207 | | | ((IntT::from_encoded_base(self.rc_middle_base)) << (2 * (half_k - 1))))
| |____________________________________________________________________________________________^ help: consider parenthesizing your expression: `(self.rc_lower >> 2) | ((IntT::from_encoded_base(self.rc_middle_base)) << (2 * (half_k - 1)))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
|
operator precedence can trip the unwary:
src/ska_dict/split_kmer.rs#L199
warning: operator precedence can trip the unwary
--> src/ska_dict/split_kmer.rs:199:27
|
199 | self.upper = (self.upper << 2
| ___________________________^
200 | | | (IntT::from_encoded_base(self.middle_base) << (half_k * 2)))
| |_____________________________________________________________________________^ help: consider parenthesizing your expression: `(self.upper << 2) | (IntT::from_encoded_base(self.middle_base) << (half_k * 2))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
= note: `#[warn(clippy::precedence)]` on by default
|
Rust project - latest (nightly)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Rust project - latest (beta)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Rust project - latest (stable)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|