mirror of
https://github.com/eycorsican/leaf.git
synced 2026-12-06 16:01:29 +00:00
stat: optimize counter removal
This commit is contained in:
1 parent
039d95955c
commit
eeb44485ad
1 file changed
+1
-1
@@ -178,7 +178,7 @@ impl StatManager {
|
||||
let mut i = 0;
|
||||
while i < sm.counters.len() {
|
||||
if sm.counters[i].recv_completed() && sm.counters[i].send_completed() {
|
||||
sm.counters.remove(i);
|
||||
sm.counters.swap_remove(i);
|
||||
} else {
|
||||
i += 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user