Merge pull request #23 from vcoppe/tsptw #284
Annotations
16 warnings
casting to the same type is unnecessary (`usize` -> `usize`):
ddo/examples/tsptw/heuristics.rs#L50
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/tsptw/heuristics.rs:50:25
|
50 | self.nb_vars * (state.depth as usize + 1) * self.factor
| ^^^^^^^^^^^^^^^^^^^^ help: try: `state.depth`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
using `clone` on type `Set256` which implements the `Copy` trait:
ddo/examples/tsptw/relax.rs#L153
warning: using `clone` on type `Set256` which implements the `Copy` trait
--> ddo/examples/tsptw/relax.rs:153:25
|
153 | let mut maybe = self.all_maybe.clone(); // three lines: faster because it is in-place
| ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.all_maybe`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `Set256` which implements the `Copy` trait:
ddo/examples/tsptw/relax.rs#L150
warning: using `clone` on type `Set256` which implements the `Copy` trait
--> ddo/examples/tsptw/relax.rs:150:9
|
150 | self.all_agree.clone()
| ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.all_agree`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `Set256` which implements the `Copy` trait:
ddo/examples/tsptw/relax.rs#L135
warning: using `clone` on type `Set256` which implements the `Copy` trait
--> ddo/examples/tsptw/relax.rs:135:27
|
135 | Position::Virtual(self.position.clone())
| ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.position`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
casting to the same type is unnecessary (`usize` -> `usize`):
ddo/examples/tsptw/model.rs#L212
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/tsptw/model.rs:212:66
|
212 | .map(|i| self.instance.distances[i as usize][j as usize])
| ^^^^^^^^^^ help: try: `j`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
ddo/examples/tsptw/model.rs#L212
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/tsptw/model.rs:212:54
|
212 | .map(|i| self.instance.distances[i as usize][j as usize])
| ^^^^^^^^^^ help: try: `i`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
ddo/examples/tsptw/model.rs#L202
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/tsptw/model.rs:202:66
|
202 | .map(|i| self.instance.distances[i as usize][j as usize])
| ^^^^^^^^^^ help: try: `j`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
ddo/examples/tsptw/model.rs#L202
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/tsptw/model.rs:202:54
|
202 | .map(|i| self.instance.distances[i as usize][j as usize])
| ^^^^^^^^^^ help: try: `i`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
using `clone` on type `Option<Set256>` which implements the `Copy` trait:
ddo/examples/tsptw/model.rs#L100
warning: using `clone` on type `Option<Set256>` which implements the `Copy` trait
--> ddo/examples/tsptw/model.rs:100:26
|
100 | let mut maybes = state.maybe_visit.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `state.maybe_visit`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `Set256` which implements the `Copy` trait:
ddo/examples/tsptw/model.rs#L97
warning: using `clone` on type `Set256` which implements the `Copy` trait
--> ddo/examples/tsptw/model.rs:97:29
|
97 | let mut remaining = state.must_visit.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `state.must_visit`
|
= 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 function has too many arguments (8/7):
ddo/src/implementation/solver/parallel.rs#L320
warning: this function has too many arguments (8/7)
--> ddo/src/implementation/solver/parallel.rs:320:5
|
320 | / pub fn custom(
321 | | problem: &'a (dyn Problem<State = State> + Send + Sync),
322 | | relaxation: &'a (dyn Relaxation<State = State> + Send + Sync),
323 | | ranking: &'a (dyn StateRanking<State = State> + Send + Sync),
... |
328 | | nb_threads: usize,
329 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
the loop variable `i` is only used to index `table`:
ddo/examples/lcs/dp.rs#L31
warning: the loop variable `i` is only used to index `table`
--> ddo/examples/lcs/dp.rs:31:18
|
31 | for i in 0..=self.a.len() {
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
31 | for <item> in table.iter_mut().take(self.a.len() + 1) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `i` is used to index `position`:
ddo/examples/lcs/model.rs#L186
warning: the loop variable `i` is used to index `position`
--> ddo/examples/lcs/model.rs:186:22
|
186 | for i in 0..self.pb.n_strings {
| ^^^^^^^^^^^^^^^^^^^^
|
= 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()
|
186 | for (i, <item>) in position.iter_mut().enumerate().take(self.pb.n_strings) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `str` is used to index `position`:
ddo/examples/lcs/model.rs#L115
warning: the loop variable `str` is used to index `position`
--> ddo/examples/lcs/model.rs:115:24
|
115 | for str in 0..self.n_strings {
| ^^^^^^^^^^^^^^^^^
|
= 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()
|
115 | for (str, <item>) in position.iter_mut().enumerate().take(self.n_strings) {
| ~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
this function has too many arguments (8/7):
ddo/src/implementation/solver/parallel.rs#L320
warning: this function has too many arguments (8/7)
--> ddo/src/implementation/solver/parallel.rs:320:5
|
320 | / pub fn custom(
321 | | problem: &'a (dyn Problem<State = State> + Send + Sync),
322 | | relaxation: &'a (dyn Relaxation<State = State> + Send + Sync),
323 | | ranking: &'a (dyn StateRanking<State = State> + Send + Sync),
... |
328 | | nb_threads: usize,
329 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
clippy_check
Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
|