unfold two pass loop #775
test.yaml
on: pull_request
test-mac
4m 17s
test-linux
2m 55s
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
|
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 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 {
| ~~~~~~ ~~~~
|
the loop variable `i` is only used to index `lines`:
fasta_tools/src/lib.rs#L135
warning: the loop variable `i` is only used to index `lines`
--> fasta_tools/src/lib.rs:135:14
|
135 | for i in 0..lines.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
|
135 | for <item> in &lines {
| ~~~~~~ ~~~~~~
|
the loop variable `e` is used to index `edges`:
hyperbase/src/lib.rs#L135
warning: the loop variable `e` is used to index `edges`
--> hyperbase/src/lib.rs:135:14
|
135 | for e in 0..edges.len() {
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
135 | for (e, <item>) in edges.iter().enumerate() {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
|