Skip to content

Add write permissions #5

Add write permissions

Add write permissions #5

Triggered via push September 18, 2024 11:47
Status Success
Total duration 39s
Artifacts
Matrix: Build and test Rust code
Fit to window
Zoom out
Zoom in

Annotations

29 warnings
struct update has no effect, all the fields in the struct have already been specified: src/main.rs#L97
warning: struct update has no effect, all the fields in the struct have already been specified --> src/main.rs:97:5 | 97 | ..Default::default() | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update = note: `#[warn(clippy::needless_update)]` on by default
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: src/map.rs#L188
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> src/map.rs:188:10 | 188 | 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#L210
warning: unneeded `return` statement --> src/map.rs:210:5 | 210 | return encodings; | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 210 - return encodings; 210 + encodings |
this expression creates a reference which is immediately dereferenced by the compiler: src/map.rs#L181
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/map.rs:181:13 | 181 | run_to_aln(&runs, ms[i], threshold, 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#L180
warning: the loop variable `i` is used to index `ms` --> src/map.rs:180:18 | 180 | 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() | 180 | 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#L169
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> src/map.rs:169:9 | 169 | 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#L184
warning: unneeded `return` statement --> src/map.rs:184:5 | 184 | return aln; | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 184 - return aln; 184 + aln |
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: src/map.rs#L148
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> src/map.rs:148:9 | 148 | 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#L164
warning: unneeded `return` statement --> src/map.rs:164:5 | 164 | return runs; | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 164 - return runs; 164 + runs |
using `clone` on type `usize` which implements the `Copy` trait: src/map.rs#L131
warning: using `clone` on type `usize` which implements the `Copy` trait --> src/map.rs:131:28 | 131 | 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#L123
warning: this `if` has identical blocks --> src/map.rs:123:39 | 123 | } else if curr > threshold as i64 { | _______________________________________^ 124 | | res[*pos] = 'M'; 125 | | } else if curr == next - 1 && curr > 0 { | |_____^ | note: same as this --> src/map.rs:125:44 | 125 | } else if curr == next - 1 && curr > 0 { | ____________________________________________^ 126 | | res[*pos] = 'M'; 127 | | } 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#L121
warning: this `if` has identical blocks --> src/map.rs:121:51 | 121 | } else if next == 1 && curr == curr_ms as i64 { | ___________________________________________________^ 122 | | res[*pos] = 'M'; 123 | | } else if curr > threshold as i64 { | |_____^ | note: same as this --> src/map.rs:123:39 | 123 | } else if curr > threshold as i64 { | _______________________________________^ 124 | | res[*pos] = 'M'; 125 | | } 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#L109
warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do --> src/map.rs:109:10 | 109 | 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#L105
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> src/map.rs:105:11 | 105 | 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#L93
warning: this `if` has identical blocks --> src/map.rs:93:49 | 93 | } else if curr > threshold && next_run == 1 { | _________________________________________________^ 94 | | curr as i64 95 | | } else if curr > threshold && next_run < curr as i64 { | |_____^ | note: same as this --> src/map.rs:95:58 | 95 | } else if curr > threshold && next_run < curr as i64 { | __________________________________________________________^ 96 | | curr as i64 97 | | } 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#L91
warning: this `if` has identical blocks --> src/map.rs:91:49 | 91 | } else if curr > threshold && next_run <= 0 { | _________________________________________________^ 92 | | curr as i64 93 | | } else if curr > threshold && next_run == 1 { | |_____^ | note: same as this --> src/map.rs:93:49 | 93 | } else if curr > threshold && next_run == 1 { | _________________________________________________^ 94 | | curr as i64 95 | | } 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#L85
warning: this `if` has identical blocks --> src/map.rs:85:42 | 85 | } else if curr == k && next_run == 1 { | __________________________________________^ 86 | | k as i64 87 | | } else if curr == k && next_run < 0 { | |_____^ | note: same as this --> src/map.rs:87:41 | 87 | } else if curr == k && next_run < 0 { | _________________________________________^ 88 | | k as i64 89 | | } 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#L83
warning: this `if` has identical blocks --> src/map.rs:83:46 | 83 | let run: i64 = if curr == k && next == k { | ______________________________________________^ 84 | | k as i64 85 | | } else if curr == k && next_run == 1 { | |_____^ | note: same as this --> src/map.rs:85:42 | 85 | } else if curr == k && next_run == 1 { | __________________________________________^ 86 | | k as i64 87 | | } 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#L101
warning: unneeded `return` statement --> src/map.rs:101:5 | 101 | return run; | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 101 - return run; 101 + run |
unneeded `return` statement: src/map.rs#L71
warning: unneeded `return` statement --> src/map.rs:71:6 | 71 | return ms; | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 71 ~ ms 72 | }, 73 ~ } |
use of `unwrap_or` to construct default value: src/map.rs#L33
warning: use of `unwrap_or` to construct default value --> src/map.rs:33:36 | 33 | let params = params_in.clone().unwrap_or(QueryParams::default()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
unneeded `return` statement: src/map.rs#L54
warning: unneeded `return` statement --> src/map.rs:54:5 | 54 | return (sbwt, lcs); | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 54 - return (sbwt, lcs); 54 + (sbwt, lcs) |
this `impl` can be derived: src/map.rs#L22
warning: this `impl` can be derived --> src/map.rs:22:1 | 22 | / impl Default for QueryParams { 23 | | fn default() -> QueryParams { 24 | | QueryParams { 25 | | index_prefix: None, 26 | | } 27 | | } 28 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `#[warn(clippy::derivable_impls)]` on by default = help: remove the manual implementation... help: ...and instead derive it | 18 + #[derive(Default)] 19 | pub struct QueryParams { |
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#L27
warning: struct `Logger` is never constructed --> src/main.rs:27:8 | 27 | struct Logger; | ^^^^^^ | = note: `#[warn(dead_code)]` on by default
unused variable: `input_list`: src/main.rs#L88
warning: unused variable: `input_list` --> src/main.rs:88:6 | 88 | input_list, | ^^^^^^^^^^ help: try ignoring the field: `input_list: _`
unused variable: `input_list`: src/main.rs#L62
warning: unused variable: `input_list` --> src/main.rs:62:6 | 62 | input_list, | ^^^^^^^^^^ help: try ignoring the field: `input_list: _` | = note: `#[warn(unused_variables)]` on by default