docs: remove bio_diff crate from README.md (#43) #119
This workflow graph cannot be shown
A graph will be generated the next time this workflow is run.
Annotations
1 error and 9 warnings
Error
Invalid type for `on`
|
unneeded late initialization:
crates/differ/src/lib.rs#L140
warning: unneeded late initialization
--> crates/differ/src/lib.rs:140:4
|
140 | let diagonal_gap_cost: isize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
= note: `#[warn(clippy::needless_late_init)]` on by default
help: declare `diagonal_gap_cost` here
|
141 | let diagonal_gap_cost: isize = if s1.chars().nth(j - 1).unwrap() == s2.chars().nth(i - 1).unwrap() {
| ++++++++++++++++++++++++++++++
help: remove the assignments from the branches
|
142 ~ char_match
143 | } else {
144 ~ not_char_match
|
help: add a semicolon after the `if` expression
|
145 | };
| +
|
the loop variable `j` is only used to index `dir_vector`:
crates/differ/src/lib.rs#L131
warning: the loop variable `j` is only used to index `dir_vector`
--> crates/differ/src/lib.rs:131:11
|
131 | for j in 1..second_string_len + 1 {
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
131 | for <item> in dir_vector.iter_mut().skip(1).take(second_string_len) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
this expression creates a reference which is immediately dereferenced by the compiler:
crates/differ/src/lib.rs#L104
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/differ/src/lib.rs:104:25
|
104 | 1.0 - self.similarity(&score)
| ^^^^^^ help: change this to: `score`
|
= 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
|
redundant clone:
crates/differ/src/levenshtein.rs#L111
warning: redundant clone
--> crates/differ/src/levenshtein.rs:111:48
|
111 | let temp = get_operations(&dir_matrix, s2, s1).clone();
| ^^^^^^^^ help: remove this
|
note: this value is dropped without further use
--> crates/differ/src/levenshtein.rs:111:13
|
111 | let temp = get_operations(&dir_matrix, s2, s1).clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
= note: `#[warn(clippy::redundant_clone)]` on by default
|
the loop variable `j` is used to index `my_vec`:
crates/differ/src/levenshtein.rs#L104
warning: the loop variable `j` is used to index `my_vec`
--> crates/differ/src/levenshtein.rs:104:11
|
104 | for j in 0..left_str_len {
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator and enumerate()
|
104 | for (j, <item>) in my_vec.iter_mut().enumerate().take(left_str_len) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do:
crates/differ/src/levenshtein.rs#L100
warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
--> crates/differ/src/levenshtein.rs:100:35
|
100 | pub(crate) fn my_init_vec(my_vec: &mut Vec<Vec<isize>>, top_str_len: usize, left_str_len: usize) {
| ^^^^^^^^^^^^^^^^^^^^ help: change this to: `&mut [Vec<isize>]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
crates/differ/src/levenshtein.rs#L13
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> crates/differ/src/levenshtein.rs:13:10
|
13 | my_opp: &Vec<Vec<char>>,
| ^^^^^^^^^^^^^^^ help: change this to: `&[Vec<char>]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do:
crates/differ/src/levenshtein.rs#L4
warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
--> crates/differ/src/levenshtein.rs:4:47
|
4 | pub(crate) fn reverse_vec_and_indexes(my_vec: &mut Vec<StringDiffOp>, mut top_string_len: usize) {
| ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&mut [StringDiffOp]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
|
redundant field names in struct initialization:
crates/differ/src/lib.rs#L71
warning: redundant field names in struct initialization
--> crates/differ/src/lib.rs:71:4
|
71 | total_len: total_len,
| ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `total_len`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
= note: `#[warn(clippy::redundant_field_names)]` on by default
|