switch packet buffer to smallvec
This commit is contained in:
@@ -3,6 +3,7 @@ use std::fmt::Debug;
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
use eyre::eyre;
|
||||
use serde::Serialize;
|
||||
use smallvec::SmallVec;
|
||||
use tokio::{
|
||||
io::{AsyncReadExt, AsyncWriteExt},
|
||||
net::tcp::{ReadHalf, WriteHalf},
|
||||
@@ -79,7 +80,7 @@ pub struct Header {
|
||||
#[derive(Serialize, Default, Clone)]
|
||||
pub struct Packet {
|
||||
pub header: Header,
|
||||
pub data: Vec<u8>,
|
||||
pub data: SmallVec<[u8; 8]>,
|
||||
}
|
||||
|
||||
impl Packet {
|
||||
|
||||
Reference in New Issue
Block a user