GitHub Actions / clippy
failed
Dec 5, 2023 in 1s
clippy
1 error
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 1 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.74.0 (79e9716c9 2023-11-13)
- cargo 1.74.0 (ecb9851af 2023-10-18)
- clippy 0.1.74 (79e9716 2023-11-13)
Annotations
Check failure on line 928 in crates/pool/src/mempool/uo_pool.rs
github-actions / clippy
borrow of moved value: `ops`
error[E0382]: borrow of moved value: `ops`
--> crates/pool/src/mempool/uo_pool.rs:928:52
|
915 | let mut ops = vec![];
| ------- move occurs because `ops` has type `std::vec::Vec<mempool::uo_pool::tests::OpWithErrors>`, which does not implement the `Copy` trait
...
922 | for op in ops {
| --- `ops` moved due to this implicit call to `.into_iter()`
...
928 | .add_operation(OperationOrigin::Local, ops[4].op.clone())
| ^^^ value borrowed here after move
|
note: `std::iter::IntoIterator::into_iter` takes ownership of the receiver `self`, which moves `ops`
--> /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/iter/traits/collect.rs:267:18
help: consider iterating over a slice of the `std::vec::Vec<mempool::uo_pool::tests::OpWithErrors>`'s content to avoid moving into the `for` loop
|
922 | for op in &ops {
| +
Loading