Skip to content

Specify toolchain

Specify toolchain #8

Triggered via push September 18, 2024 19:45
Status Success
Total duration 15s
Artifacts
Push commits to codeberg
6s
Push commits to codeberg
Fit to window
Zoom out
Zoom in

Annotations

27 warnings
Push commits to codeberg
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: src/map.rs#L175
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> src/map.rs:175:10 | 175 | aln: &Vec<char>, | ^^^^^^^^^^ help: change this to: `&[char]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
unneeded `return` statement: src/map.rs#L197
warning: unneeded `return` statement --> src/map.rs:197:5 | 197 | return encodings; | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 197 - return encodings; 197 + encodings |
this expression creates a reference which is immediately dereferenced by the compiler: src/map.rs#L168
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/map.rs:168:13 | 168 | run_to_aln(&runs, ms[i], params.threshold, params.k, &mut aln, &mut i); | ^^^^^ help: change this to: `runs` | = 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
the loop variable `i` is used to index `ms`: src/map.rs#L167
warning: the loop variable `i` is used to index `ms` --> src/map.rs:167:18 | 167 | for mut i in 3..(len - 1) { | ^^^^^^^^^^^^ | = 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() | 167 | for (i, <item>) in ms.iter().enumerate().take((len - 1)).skip(3) { | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: src/map.rs#L158
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> src/map.rs:158:9 | 158 | ms: &Vec<usize>, | ^^^^^^^^^^^ help: change this to: `&[usize]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
unneeded `return` statement: src/map.rs#L171
warning: unneeded `return` statement --> src/map.rs:171:5 | 171 | return aln; | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 171 - return aln; 171 + aln |
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: src/map.rs#L139
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> src/map.rs:139:9 | 139 | ms: &Vec<usize>, | ^^^^^^^^^^^ help: change this to: `&[usize]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
unneeded `return` statement: src/map.rs#L153
warning: unneeded `return` statement --> src/map.rs:153:5 | 153 | return runs; | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 153 - return runs; 153 + runs |
using `clone` on type `usize` which implements the `Copy` trait: src/map.rs#L122
warning: using `clone` on type `usize` which implements the `Copy` trait --> src/map.rs:122:28 | 122 | let mut next_gap: usize = pos.clone(); | ^^^^^^^^^^^ help: try dereferencing it: `*pos` | = 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
this `if` has identical blocks: src/map.rs#L114
warning: this `if` has identical blocks --> src/map.rs:114:39 | 114 | } else if curr > threshold as i64 { | _______________________________________^ 115 | | res[*pos] = 'M'; 116 | | } else if curr == next - 1 && curr > 0 { | |_____^ | note: same as this --> src/map.rs:116:44 | 116 | } else if curr == next - 1 && curr > 0 { | ____________________________________________^ 117 | | res[*pos] = 'M'; 118 | | } else if curr == 0 && next == 1 && prev > 0 { | |_____^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
this `if` has identical blocks: src/map.rs#L112
warning: this `if` has identical blocks --> src/map.rs:112:51 | 112 | } else if next == 1 && curr == curr_ms as i64 { | ___________________________________________________^ 113 | | res[*pos] = 'M'; 114 | | } else if curr > threshold as i64 { | |_____^ | note: same as this --> src/map.rs:114:39 | 114 | } else if curr > threshold as i64 { | _______________________________________^ 115 | | res[*pos] = 'M'; 116 | | } else if curr == next - 1 && curr > 0 { | |_____^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do: src/map.rs#L100
warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do --> src/map.rs:100:10 | 100 | res: &mut Vec<char>, | ^^^^^^^^^^^^^^ help: change this to: `&mut [char]` | = 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: src/map.rs#L96
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> src/map.rs:96:11 | 96 | runs: &Vec<i64>, | ^^^^^^^^^ help: change this to: `&[i64]` | = 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
this `if` has identical blocks: src/map.rs#L84
warning: this `if` has identical blocks --> src/map.rs:84:49 | 84 | } else if curr > threshold && next_run == 1 { | _________________________________________________^ 85 | | curr as i64 86 | | } else if curr > threshold && next_run < curr as i64 { | |_____^ | note: same as this --> src/map.rs:86:58 | 86 | } else if curr > threshold && next_run < curr as i64 { | __________________________________________________________^ 87 | | curr as i64 88 | | } else { | |_____^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
this `if` has identical blocks: src/map.rs#L82
warning: this `if` has identical blocks --> src/map.rs:82:49 | 82 | } else if curr > threshold && next_run <= 0 { | _________________________________________________^ 83 | | curr as i64 84 | | } else if curr > threshold && next_run == 1 { | |_____^ | note: same as this --> src/map.rs:84:49 | 84 | } else if curr > threshold && next_run == 1 { | _________________________________________________^ 85 | | curr as i64 86 | | } else if curr > threshold && next_run < curr as i64 { | |_____^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
this `if` has identical blocks: src/map.rs#L76
warning: this `if` has identical blocks --> src/map.rs:76:42 | 76 | } else if curr == k && next_run == 1 { | __________________________________________^ 77 | | k as i64 78 | | } else if curr == k && next_run < 0 { | |_____^ | note: same as this --> src/map.rs:78:41 | 78 | } else if curr == k && next_run < 0 { | _________________________________________^ 79 | | k as i64 80 | | } else if curr < threshold { | |_____^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
this `if` has identical blocks: src/map.rs#L74
warning: this `if` has identical blocks --> src/map.rs:74:46 | 74 | let run: i64 = if curr == k && next == k { | ______________________________________________^ 75 | | k as i64 76 | | } else if curr == k && next_run == 1 { | |_____^ | note: same as this --> src/map.rs:76:42 | 76 | } else if curr == k && next_run == 1 { | __________________________________________^ 77 | | k as i64 78 | | } else if curr == k && next_run < 0 { | |_____^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else = note: `#[warn(clippy::if_same_then_else)]` on by default
unneeded `return` statement: src/map.rs#L92
warning: unneeded `return` statement --> src/map.rs:92:5 | 92 | return run; | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 92 - return run; 92 + run |
unneeded `return` statement: src/map.rs#L62
warning: unneeded `return` statement --> src/map.rs:62:6 | 62 | return ms; | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 62 ~ ms 63 | }, 64 ~ } |
unneeded `return` statement: src/map.rs#L45
warning: unneeded `return` statement --> src/map.rs:45:5 | 45 | return (sbwt, lcs); | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 45 - return (sbwt, lcs); 45 + (sbwt, lcs) |
use of `unwrap_or` to construct default value: src/build.rs#L85
warning: use of `unwrap_or` to construct default value --> src/build.rs:85:36 | 85 | let params = params_in.clone().unwrap_or(SBWTParams::default()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
use of `unwrap_or` to construct default value: src/build.rs#L58
warning: use of `unwrap_or` to construct default value --> src/build.rs:58:36 | 58 | let params = params_in.clone().unwrap_or(SBWTParams::default()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default = note: `#[warn(clippy::unwrap_or_default)]` on by default
unneeded `return` statement: src/build.rs#L77
warning: unneeded `return` statement --> src/build.rs:77:5 | 77 | return (sbwt, lcs); | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 77 - return (sbwt, lcs); 77 + (sbwt, lcs) |
struct `Logger` is never constructed: src/main.rs#L28
warning: struct `Logger` is never constructed --> src/main.rs:28:8 | 28 | struct Logger; | ^^^^^^ | = note: `#[warn(dead_code)]` on by default
unused variable: `input_list`: src/main.rs#L89
warning: unused variable: `input_list` --> src/main.rs:89:6 | 89 | input_list, | ^^^^^^^^^^ help: try ignoring the field: `input_list: _`
unused variable: `input_list`: src/main.rs#L63
warning: unused variable: `input_list` --> src/main.rs:63:6 | 63 | input_list, | ^^^^^^^^^^ help: try ignoring the field: `input_list: _` | = note: `#[warn(unused_variables)]` on by default