Skip to content

Refactor is_valid fn #648

Refactor is_valid fn

Refactor is_valid fn #648

Triggered via pull request March 4, 2024 18:20
Status Success
Total duration 4m 52s
Artifacts

test.yaml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

11 warnings
test-linux
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: 10XGenomics/clippy-check@main. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
`if` chain can be rewritten with `match`: vector_utils/src/lib.rs#L138
warning: `if` chain can be rewritten with `match` --> vector_utils/src/lib.rs:138:9 | 138 | / if x[i] < y[j] { 139 | | i += 1; 140 | | } else if y[j] < x[i] { 141 | | j += 1; 142 | | } else { 143 | | return true; 144 | | } | |_________^ | = help: consider rewriting the `if` chain to use `cmp` and `match` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain = note: `#[warn(clippy::comparison_chain)]` on by default
`if` chain can be rewritten with `match`: vector_utils/src/lib.rs#L158
warning: `if` chain can be rewritten with `match` --> vector_utils/src/lib.rs:158:9 | 158 | / if x[i] < y[j] { 159 | | i += 1; 160 | | } else if y[j] < x[i] { 161 | | j += 1; ... | 165 | | j += 1; 166 | | } | |_________^ | = help: consider rewriting the `if` chain to use `cmp` and `match` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
`if` chain can be rewritten with `match`: vector_utils/src/lib.rs#L177
warning: `if` chain can be rewritten with `match` --> vector_utils/src/lib.rs:177:9 | 177 | / if x[ix] < y[iy] { 178 | | ix += 1; 179 | | } else if y[iy] < x[ix] { 180 | | iy += 1; ... | 184 | | iy += 1; 185 | | } | |_________^ | = help: consider rewriting the `if` chain to use `cmp` and `match` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
calling `set_len()` immediately after reserving a buffer creates uninitialized values: vector_utils/src/lib.rs#L490
warning: calling `set_len()` immediately after reserving a buffer creates uninitialized values --> vector_utils/src/lib.rs:490:5 | 490 | x.reserve(n); | ^^^^^^^^^^^^^ 491 | x.set_len(n); /* unsafe */ | ^^^^^^^^^^^^ | = help: initialize the buffer or wrap the content in `MaybeUninit` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninit_vec note: the lint level is defined here --> vector_utils/src/lib.rs:487:8 | 487 | #[warn(clippy::uninit_vec)] | ^^^^^^^^^^^^^^^^^^
the loop variable `j` is only used to index `v`: graph_simple/src/lib.rs#L177
warning: the loop variable `j` is only used to index `v` --> graph_simple/src/lib.rs:177:18 | 177 | for j in 0..v.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 | 177 | for <item> in &v { | ~~~~~~ ~~
the loop variable `j` is only used to index `v`: graph_simple/src/lib.rs#L208
warning: the loop variable `j` is only used to index `v` --> graph_simple/src/lib.rs:208:18 | 208 | for j in 0..v.len() { | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop help: consider using an iterator | 208 | for <item> in &v { | ~~~~~~ ~~
the loop variable `j` is only used to index `comp`: graph_simple/src/lib.rs#L278
warning: the loop variable `j` is only used to index `comp` --> graph_simple/src/lib.rs:278:18 | 278 | for j in 0..comp.len() { | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop help: consider using an iterator | 278 | for <item> in &mut comp { | ~~~~~~ ~~~~~~~~~
the loop variable `u` is only used to index `comp`: graph_simple/src/lib.rs#L293
warning: the loop variable `u` is only used to index `comp` --> graph_simple/src/lib.rs:293:18 | 293 | for u in 0..comp.len() { | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop help: consider using an iterator | 293 | for <item> in &mut comp { | ~~~~~~ ~~~~~~~~~
the loop variable `i` is used to index `s`: io_utils/src/lib.rs#L305
warning: the loop variable `i` is used to index `s` --> io_utils/src/lib.rs:305:18 | 305 | for i in 0..s.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() | 305 | for (i, <item>) in s.iter().enumerate() { | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
the loop variable `i` is only used to index `adj`: hyperbase/src/lib.rs#L119
warning: the loop variable `i` is only used to index `adj` --> hyperbase/src/lib.rs:119:14 | 119 | for i in 0..adj.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 | 119 | for <item> in &adj { | ~~~~~~ ~~~~