Skip to content

Commit

Permalink
style(proto): replace VecDeque::remove(0) with VecDeque::pop_front
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobarbolini committed Jan 26, 2025
1 parent 80b783a commit a1b789b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions watermelon-proto/src/util/buf_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl<B: Buf> Buf for BufList<B> {
self.len -= cnt;
cnt -= cnt;
} else {
let _ = self.bufs.remove(0);
let _ = self.bufs.pop_front();
self.len -= remaining;
cnt -= remaining;
}
Expand Down Expand Up @@ -99,7 +99,7 @@ impl<B: Buf> Buf for BufList<B> {
}
Ordering::Equal => {
self.len -= len;
return self.bufs.remove(0).unwrap().copy_to_bytes(len);
return self.bufs.pop_front().unwrap().copy_to_bytes(len);
}
Ordering::Less => {}
}
Expand Down

0 comments on commit a1b789b

Please sign in to comment.