Skip to content

Commit caf668c

Browse files
committed
loop fix
1 parent bebe7ac commit caf668c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/agent/docker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ fn calc_network(stats: &ContainerStatsResponse) -> (u64, u64) {
315315
if let Some(networks) = &stats.networks {
316316
let mut rx = 0u64;
317317
let mut tx = 0u64;
318-
for (_iface, data) in networks.iter() {
318+
for data in networks.values() {
319319
rx = rx.saturating_add(data.rx_bytes.unwrap_or(0));
320320
tx = tx.saturating_add(data.tx_bytes.unwrap_or(0));
321321
}

0 commit comments

Comments
 (0)