add initial capacity

This commit is contained in:
yggverse 2024-10-30 14:23:40 +02:00
parent 36b8342f29
commit 47f58f800d

View file

@ -18,7 +18,7 @@ impl Meta {
/// Parse Meta from UTF-8
pub fn from(buffer: &[u8]) -> Result<Self, Error> {
// Init bytes buffer
let mut bytes: Vec<u8> = Vec::new();
let mut bytes: Vec<u8> = Vec::with_capacity(1021);
// Skip 3 bytes for status code of 1024 expected
match buffer.get(3..1021) {