because it is sometimes useful, the transition cost function now has … #301
Annotations
64 warnings
casting to the same type is unnecessary (`usize` -> `usize`):
ddo/examples/sop/io_utils.rs#L91
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/io_utils.rs:91:21
|
91 | let i = (lc - 1) as usize;
| ^^^^^^^^^^^^^^^^^ help: try: `(lc - 1)`
|
= 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/sop/heuristics.rs#L46
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/heuristics.rs:46:25
|
46 | 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
|
casting to the same type is unnecessary (`usize` -> `usize`):
ddo/examples/sop/relax.rs#L139
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/relax.rs:139:28
|
139 | let n_must_visit = state.must_schedule.len() as usize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `state.must_schedule.len()`
|
= 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/sop/relax.rs#L138
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/relax.rs:138:54
|
138 | let complete_tour = self.pb.nb_variables() - state.depth as usize;
| ^^^^^^^^^^^^^^^^^^^^ 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/sop/relax.rs#L96
warning: using `clone` on type `Set256` which implements the `Copy` trait
--> ddo/examples/sop/relax.rs:96:25
|
96 | 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/sop/relax.rs#L93
warning: using `clone` on type `Set256` which implements the `Copy` trait
--> ddo/examples/sop/relax.rs:93:9
|
93 | 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/sop/relax.rs#L90
warning: using `clone` on type `Set256` which implements the `Copy` trait
--> ddo/examples/sop/relax.rs:90:27
|
90 | Previous::Virtual(self.previous.clone())
| ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.previous`
|
= 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/sop/relax.rs#L72
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/relax.rs:72:59
|
72 | Previous::Job(x) => self.previous.add_inplace(*x as usize),
| ^^^^^^^^^^^ help: try: `*x`
|
= 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/sop/model.rs#L155
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/model.rs:155:66
|
155 | .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/sop/model.rs#L155
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/model.rs:155:54
|
155 | .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/sop/model.rs#L151
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/model.rs:151:41
|
151 | self.instance.distances[*i as usize][j]
| ^^^^^^^^^^^ 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/sop/model.rs#L148
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/model.rs:148:60
|
148 | Previous::Job(i) => if self.instance.distances[*i as usize][j] == -1 {
| ^^^^^^^^^^^ 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/sop/model.rs#L85
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/model.rs:85:12
|
85 | if state.depth as usize == self.nb_variables() - 1 {
| ^^^^^^^^^^^^^^^^^^^^ 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 `SopState` which implements the `Copy` trait:
ddo/examples/sop/model.rs#L75
warning: using `clone` on type `SopState` which implements the `Copy` trait
--> ddo/examples/sop/model.rs:75:9
|
75 | self.initial.clone()
| ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.initial`
|
= 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
|
casting to the same type is unnecessary (`usize` -> `usize`):
ddo/examples/sop/model.rs#L71
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/model.rs:71:9
|
71 | (self.instance.nb_jobs - 1) as usize
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.instance.nb_jobs - 1)`
|
= 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/sop/model.rs#L50
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/model.rs:50:17
|
50 | let n = inst.nb_jobs as usize;
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `inst.nb_jobs`
|
= 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/sop/model.rs#L38
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> ddo/examples/sop/model.rs:38:67
|
38 | (1..inst.nb_jobs).for_each(|i| {must_schedule.add_inplace(i 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
|
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
|
length comparison to zero:
ddo/examples/alp/model.rs#L192
warning: length comparison to zero
--> ddo/examples/alp/model.rs:192:20
|
192 | if used.len() == 0 {
| ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `used.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
|
methods called `from_*` usually take no `self`:
ddo/examples/alp/model.rs#L101
warning: methods called `from_*` usually take no `self`
--> ddo/examples/alp/model.rs:101:26
|
101 | pub fn from_decision(&self, value: isize) -> AlpDecision {
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `#[warn(clippy::wrong_self_convention)]` on by default
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
ddo/examples/alp/model.rs#L85
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> ddo/examples/alp/model.rs:85:42
|
85 | pub fn get_arrival_time(&self, info: &Vec<RunwayState>, aircraft: usize, runway: usize) -> isize {
| ^^^^^^^^^^^^^^^^^ help: change this to: `&[RunwayState]`
|
= 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
|
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
|
the loop variable `j` is used to index `min_separation_to`:
ddo/examples/alp/model.rs#L73
warning: the loop variable `j` is used to index `min_separation_to`
--> ddo/examples/alp/model.rs:73:22
|
73 | for j in 0..instance.nb_classes {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= 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()
|
73 | for (j, <item>) in min_separation_to.iter_mut().enumerate().take(instance.nb_classes) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
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
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/pooled.rs#L185
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/pooled.rs:185:13
|
185 | $action(edge);
| ^^^^^^^^^^^^^
...
883 | / foreach!(edge of NodeId(id), self, |edge: Edge| {
884 | | let Edge{from, to, decision, cost} = edge;
885 | | let best = get!(node NodeId(id), self).best;
886 | | let best = best.map(|eid| *get!(edge eid, self));
887 | | out.push_str(&Self::edge(from.0, to.0, decision, cost, Some(edge) == best));
888 | | });
| |__________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/pooled.rs#L185
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/pooled.rs:185:13
|
185 | $action(edge);
| ^^^^^^^^^^^^^
...
798 | / foreach!(edge of drop_id, self, |edge: Edge| {
799 | | let src = get!(node edge.from, self).state.as_ref();
800 | | let dst = get!(node edge.to, self).state.as_ref();
801 | | let rcost = input.relaxation.relax(src, dst, merged.as_ref(), edge.decision, edge.cost);
... |
808 | | });
809 | | });
| |______________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/pooled.rs#L185
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/pooled.rs:185:13
|
185 | $action(edge);
| ^^^^^^^^^^^^^
...
545 | / foreach!(edge of id, self, |edge: Edge| {
546 | | let parent = get!(mut node edge.from, self);
547 | | if parent.flags.is_exact() && !parent.flags.is_cutset() {
548 | | if !self.is_exact {
... |
552 | | }
553 | | });
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/pooled.rs#L185
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/pooled.rs:185:13
|
185 | $action(edge);
| ^^^^^^^^^^^^^
...
511 | / foreach!(edge of id, self, |edge: Edge| {
512 | | let parent = get!(mut node edge.from, self);
513 | | let theta = parent.theta.unwrap_or(isize::MAX);
514 | | parent.theta = Some(theta.min(my_theta.saturating_sub(edge.cost)));
515 | | });
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/pooled.rs#L185
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/pooled.rs:185:13
|
185 | $action(edge);
| ^^^^^^^^^^^^^
...
454 | / foreach!(edge of id, self, |edge: Edge| {
455 | | let using_edge = value.saturating_add(edge.cost);
456 | | let parent = get!(mut node edge.from, self);
457 | | parent.flags.set_marked(true);
458 | | parent.value_bot = parent.value_bot.max(using_edge);
459 | | });
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
the loop variable `i` is only used to index `lengths`:
ddo/examples/srflp/io_utils.rs#L88
warning: the loop variable `i` is only used to index `lengths`
--> ddo/examples/srflp/io_utils.rs:88:18
|
88 | for i in 0..nb_departments {
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
88 | for <item> in lengths.iter_mut().take(nb_departments) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `i` is used to index `lengths`:
ddo/examples/srflp/relax.rs#L177
warning: the loop variable `i` is used to index `lengths`
--> ddo/examples/srflp/relax.rs:177:18
|
177 | for i in 0..(complete_arrangement-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()
|
177 | for (i, <item>) in lengths.iter().enumerate().take((complete_arrangement-1)) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
using `clone` on type `Option<Set64>` which implements the `Copy` trait:
ddo/examples/srflp/model.rs#L102
warning: using `clone` on type `Option<Set64>` which implements the `Copy` trait
--> ddo/examples/srflp/model.rs:102:26
|
102 | let mut maybes = state.maybe_place.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `state.maybe_place`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `Set64` which implements the `Copy` trait:
ddo/examples/srflp/model.rs#L99
warning: using `clone` on type `Set64` which implements the `Copy` trait
--> ddo/examples/srflp/model.rs:99:29
|
99 | let mut remaining = state.must_place.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `state.must_place`
|
= 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
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/clean.rs#L192
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/clean.rs:192:13
|
192 | $action(edge);
| ^^^^^^^^^^^^^
...
963 | / foreach!(edge of NodeId(id), self, |edge: Edge| {
964 | | let Edge{from, to, decision, cost} = edge;
965 | | let best = get!(node NodeId(id), self).best;
966 | | let best = best.map(|eid| *get!(edge eid, self));
967 | | out.push_str(&Self::edge(from.0, to.0, decision, cost, Some(edge) == best));
968 | | });
| |__________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
ddo/examples/talentsched/io_utils.rs#L75
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> ddo/examples/talentsched/io_utils.rs:75:13
|
75 | / match data.next() {
76 | | Some(val) => {
77 | | nb_actors = val.parse()?;
78 | | i += 1;
79 | | },
80 | | None => (),
81 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try
|
75 ~ if let Some(val) = data.next() {
76 + nb_actors = val.parse()?;
77 + i += 1;
78 + }
|
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/clean.rs#L192
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/clean.rs:192:13
|
192 | $action(edge);
| ^^^^^^^^^^^^^
...
847 | / foreach!(edge of drop_id, self, |edge: Edge| {
848 | | let src = get!(node edge.from, self).state.as_ref();
849 | | let dst = get!(node edge.to, self).state.as_ref();
850 | | let rcost = input.relaxation.relax(src, dst, merged.as_ref(), edge.decision, edge.cost);
... |
857 | | });
858 | | });
| |______________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
the loop variable `j` is used to index `actors`:
ddo/examples/talentsched/model.rs#L47
warning: the loop variable `j` is used to index `actors`
--> ddo/examples/talentsched/model.rs:47:22
|
47 | for j in 0..instance.nb_scenes {
| ^^^^^^^^^^^^^^^^^^^^^
|
= 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()
|
47 | for (j, <item>) in actors.iter_mut().enumerate().take(instance.nb_scenes) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/clean.rs#L192
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/clean.rs:192:13
|
192 | $action(edge);
| ^^^^^^^^^^^^^
...
593 | / foreach!(edge of id, self, |edge: Edge| {
594 | | let parent = get!(mut node edge.from, self);
595 | | if parent.flags.is_exact() && !parent.flags.is_cutset() {
596 | | self.cutset.push(edge.from);
597 | | parent.flags.set_cutset(true);
598 | | }
599 | | });
| |______________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/clean.rs#L192
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/clean.rs:192:13
|
192 | $action(edge);
| ^^^^^^^^^^^^^
...
521 | / foreach!(edge of id, self, |edge: Edge| {
522 | | let parent = get!(mut node edge.from, self);
523 | | let theta = parent.theta.unwrap_or(isize::MAX);
524 | | parent.theta = Some(theta.min(my_theta.saturating_sub(edge.cost)));
525 | | });
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/clean.rs#L192
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/clean.rs:192:13
|
192 | $action(edge);
| ^^^^^^^^^^^^^
...
464 | / foreach!(edge of id, self, |edge: Edge| {
465 | | let using_edge = value.saturating_add(edge.cost);
466 | | let parent = get!(mut node edge.from, self);
467 | | parent.flags.set_marked(true);
468 | | parent.value_bot = parent.value_bot.max(using_edge);
469 | | });
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: `#[warn(clippy::redundant_closure_call)]` on by default
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
ddo/examples/psp/ub_utils.rs#L23
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> ddo/examples/psp/ub_utils.rs:23:28
|
23 | pub fn all_mst(changeover: &Vec<Vec<usize>>) -> Vec<usize> {
| ^^^^^^^^^^^^^^^^ help: change this to: `&[Vec<usize>]`
|
= 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
|
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) {
| ~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/pooled.rs#L185
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/pooled.rs:185:13
|
185 | $action(edge);
| ^^^^^^^^^^^^^
...
883 | / foreach!(edge of NodeId(id), self, |edge: Edge| {
884 | | let Edge{from, to, decision, cost} = edge;
885 | | let best = get!(node NodeId(id), self).best;
886 | | let best = best.map(|eid| *get!(edge eid, self));
887 | | out.push_str(&Self::edge(from.0, to.0, decision, cost, Some(edge) == best));
888 | | });
| |__________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/pooled.rs#L185
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/pooled.rs:185:13
|
185 | $action(edge);
| ^^^^^^^^^^^^^
...
798 | / foreach!(edge of drop_id, self, |edge: Edge| {
799 | | let src = get!(node edge.from, self).state.as_ref();
800 | | let dst = get!(node edge.to, self).state.as_ref();
801 | | let rcost = input.relaxation.relax(src, dst, merged.as_ref(), edge.decision, edge.cost);
... |
808 | | });
809 | | });
| |______________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/pooled.rs#L185
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/pooled.rs:185:13
|
185 | $action(edge);
| ^^^^^^^^^^^^^
...
545 | / foreach!(edge of id, self, |edge: Edge| {
546 | | let parent = get!(mut node edge.from, self);
547 | | if parent.flags.is_exact() && !parent.flags.is_cutset() {
548 | | if !self.is_exact {
... |
552 | | }
553 | | });
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/pooled.rs#L185
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/pooled.rs:185:13
|
185 | $action(edge);
| ^^^^^^^^^^^^^
...
511 | / foreach!(edge of id, self, |edge: Edge| {
512 | | let parent = get!(mut node edge.from, self);
513 | | let theta = parent.theta.unwrap_or(isize::MAX);
514 | | parent.theta = Some(theta.min(my_theta.saturating_sub(edge.cost)));
515 | | });
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/pooled.rs#L185
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/pooled.rs:185:13
|
185 | $action(edge);
| ^^^^^^^^^^^^^
...
454 | / foreach!(edge of id, self, |edge: Edge| {
455 | | let using_edge = value.saturating_add(edge.cost);
456 | | let parent = get!(mut node edge.from, self);
457 | | parent.flags.set_marked(true);
458 | | parent.value_bot = parent.value_bot.max(using_edge);
459 | | });
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/clean.rs#L192
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/clean.rs:192:13
|
192 | $action(edge);
| ^^^^^^^^^^^^^
...
963 | / foreach!(edge of NodeId(id), self, |edge: Edge| {
964 | | let Edge{from, to, decision, cost} = edge;
965 | | let best = get!(node NodeId(id), self).best;
966 | | let best = best.map(|eid| *get!(edge eid, self));
967 | | out.push_str(&Self::edge(from.0, to.0, decision, cost, Some(edge) == best));
968 | | });
| |__________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/clean.rs#L192
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/clean.rs:192:13
|
192 | $action(edge);
| ^^^^^^^^^^^^^
...
847 | / foreach!(edge of drop_id, self, |edge: Edge| {
848 | | let src = get!(node edge.from, self).state.as_ref();
849 | | let dst = get!(node edge.to, self).state.as_ref();
850 | | let rcost = input.relaxation.relax(src, dst, merged.as_ref(), edge.decision, edge.cost);
... |
857 | | });
858 | | });
| |______________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/clean.rs#L192
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/clean.rs:192:13
|
192 | $action(edge);
| ^^^^^^^^^^^^^
...
593 | / foreach!(edge of id, self, |edge: Edge| {
594 | | let parent = get!(mut node edge.from, self);
595 | | if parent.flags.is_exact() && !parent.flags.is_cutset() {
596 | | self.cutset.push(edge.from);
597 | | parent.flags.set_cutset(true);
598 | | }
599 | | });
| |______________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/clean.rs#L192
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/clean.rs:192:13
|
192 | $action(edge);
| ^^^^^^^^^^^^^
...
521 | / foreach!(edge of id, self, |edge: Edge| {
522 | | let parent = get!(mut node edge.from, self);
523 | | let theta = parent.theta.unwrap_or(isize::MAX);
524 | | parent.theta = Some(theta.min(my_theta.saturating_sub(edge.cost)));
525 | | });
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
try not to call a closure in the expression where it is declared:
ddo/src/implementation/mdd/clean.rs#L192
warning: try not to call a closure in the expression where it is declared
--> ddo/src/implementation/mdd/clean.rs:192:13
|
192 | $action(edge);
| ^^^^^^^^^^^^^
...
464 | / foreach!(edge of id, self, |edge: Edge| {
465 | | let using_edge = value.saturating_add(edge.cost);
466 | | let parent = get!(mut node edge.from, self);
467 | | parent.flags.set_marked(true);
468 | | parent.value_bot = parent.value_bot.max(using_edge);
469 | | });
| |__________________________- in this macro invocation
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
= note: `#[warn(clippy::redundant_closure_call)]` on by default
= note: this warning originates in the macro `foreach` (in Nightly builds, run with -Z macro-backtrace for more info)
|
build
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
build
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
build
virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
|