mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
add initial capacity
This commit is contained in:
parent
36b8342f29
commit
47f58f800d
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ impl Meta {
|
||||||
/// Parse Meta from UTF-8
|
/// Parse Meta from UTF-8
|
||||||
pub fn from(buffer: &[u8]) -> Result<Self, Error> {
|
pub fn from(buffer: &[u8]) -> Result<Self, Error> {
|
||||||
// Init bytes buffer
|
// 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
|
// Skip 3 bytes for status code of 1024 expected
|
||||||
match buffer.get(3..1021) {
|
match buffer.get(3..1021) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue