mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-02-21 22:34:29 +00:00
libs: Fix clippy into_iter_on_ref
Fix `into_iter_on_ref` clippy warning as suggested by rust 1.85.1, since
`mem-agent` is now a member of `libs` workspace.
```console
error: this `.into_iter()` call is equivalent to `.iter_mut()` and will not consume the `Vec`
--> mem-agent/src/memcg.rs:1122:27
|
1122 | for info in infov.into_iter() {
| ^^^^^^^^^ help: call directly: `iter_mut`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `-D clippy::into-iter-on-ref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::into_iter_on_ref)]`
```
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
@@ -1119,7 +1119,7 @@ impl MemCG {
|
||||
}
|
||||
|
||||
let psi_path = self.memcgs.blocking_read().config.psi_path.clone();
|
||||
for info in infov.into_iter() {
|
||||
for info in infov.iter_mut() {
|
||||
info.eviction = Some(EvictionInfo {
|
||||
psi: psi::Period::new(&psi_path.join(info.path.trim_start_matches('/')), false),
|
||||
last_min_lru_file: 0,
|
||||
|
||||
Reference in New Issue
Block a user