From db28d4ef8a1dc4fa94aa40687c84e22aeb652f1e Mon Sep 17 00:00:00 2001 From: parazyd Date: Wed, 30 Aug 2023 07:59:19 +0200 Subject: [PATCH] serial: Compile fix. --- src/serial/src/async_lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serial/src/async_lib.rs b/src/serial/src/async_lib.rs index 12d2fa85f..ca61101c4 100644 --- a/src/serial/src/async_lib.rs +++ b/src/serial/src/async_lib.rs @@ -571,7 +571,7 @@ impl AsyncDecodable for VecDeque { #[inline] async fn decode_async(d: &mut D) -> Result { 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?);