fix client

This commit is contained in:
griffi-gh 2023-03-09 18:00:32 +01:00
parent 940a43330a
commit 4d0f8038be

View file

@ -114,8 +114,7 @@ fn check_server_hello_response(
fn decompress_chunk_packet(data: &Box<[u8]>) -> Result<ServerToClientMessage> { fn decompress_chunk_packet(data: &Box<[u8]>) -> Result<ServerToClientMessage> {
let mut decompressed = decompress_size_prepended(&data[1..])?; let mut decompressed = decompress_size_prepended(&data[1..])?;
decompressed.insert(0, data[0]); decompressed.insert(0, data[0]);
let deserialized = postcard::from_bytes(&decompressed).ok().context("Deserialization failed")?; Ok(postcard::from_bytes(&decompressed).ok().context("Deserialization failed")?)
Ok(deserialized)
} }
//TODO get rid of this, this is awfulll //TODO get rid of this, this is awfulll