dss: Failed to run "make test_others"
nintha opened this issue · 1 comments
nintha commented
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. What did you do?
Now you can run
make test_others
to check that things are going right. You should see all tests passed.
- git clone repo
- run
make test_others
rust version: 1.44.0
OS: WSL2 Ubuntu18
2. What did you expect to see?
all tests in make test_others
passed
3. What did you see instead?
When I run make test_others
, it prints some errors.
error: redundant closure found
--> linearizability/src/models.rs:38:68
|
38 | let v = map.entry(op.input.key.clone()).or_insert_with(|| vec![]);
| ^^^^^^^^^
|
= note: `-D clippy::redundant-closure` implied by `-D clippy::all`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
error: redundant closure found
--> linearizability/src/models.rs:59:49
|
59 | m.entry(key).or_insert_with(|| vec![]).push(event);
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
error: redundant closure found
--> linearizability/src/models.rs:63:49
|
63 | m.entry(key).or_insert_with(|| vec![]).push(event);
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
error: aborting due to 3 previous errors
error: could not compile `linearizability`.
I try to fix it by replace or_insert_with(|| vec![])
with or_insert_with(Vec::new)
. It works.