Skip to content

Commit a1b789b

Browse files
style(proto): replace VecDeque::remove(0) with VecDeque::pop_front
1 parent 80b783a commit a1b789b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

watermelon-proto/src/util/buf_list.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl<B: Buf> Buf for BufList<B> {
6060
self.len -= cnt;
6161
cnt -= cnt;
6262
} else {
63-
let _ = self.bufs.remove(0);
63+
let _ = self.bufs.pop_front();
6464
self.len -= remaining;
6565
cnt -= remaining;
6666
}
@@ -99,7 +99,7 @@ impl<B: Buf> Buf for BufList<B> {
9999
}
100100
Ordering::Equal => {
101101
self.len -= len;
102-
return self.bufs.remove(0).unwrap().copy_to_bytes(len);
102+
return self.bufs.pop_front().unwrap().copy_to_bytes(len);
103103
}
104104
Ordering::Less => {}
105105
}

0 commit comments

Comments
 (0)