serial: Compile fix.

This commit is contained in:
parazyd
2023-08-30 07:59:19 +02:00
parent 2536a46aaa
commit db28d4ef8a

View File

@@ -571,7 +571,7 @@ impl<T: AsyncDecodable + Send> AsyncDecodable for VecDeque<T> {
#[inline]
async fn decode_async<D: AsyncRead + Unpin + Send>(d: &mut D) -> Result<Self> {
let len = VarInt::decode_async(d).await?.0;
let mut ret = Vec::new();
let mut ret = VecDeque::new();
ret.try_reserve(len as usize).map_err(|_| std::io::ErrorKind::InvalidData)?;
for _ in 0..len {
ret.push_back(AsyncDecodable::decode_async(d).await?);