1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-03 18:24:05 +02:00

minor speedups

This commit is contained in:
Robin Appelman 2019-03-16 16:57:10 +01:00
commit b9a92be010
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@ use crate::{ReadResult, Stream};
#[derive(Debug)] #[derive(Debug)]
pub struct ConsoleCmdPacket { pub struct ConsoleCmdPacket {
tick: u32, tick: u32,
command: LazyBitReadSized<String, LittleEndian>, command: String,
} }
impl BitRead<LittleEndian> for ConsoleCmdPacket { impl BitRead<LittleEndian> for ConsoleCmdPacket {

View file

@ -13,7 +13,7 @@ impl BitRead<LittleEndian> for UserCmdPacket {
let tick = stream.read()?; let tick = stream.read()?;
let sequence_out = stream.read()?; let sequence_out = stream.read()?;
let len: u32 = stream.read()?; let len: u32 = stream.read()?;
let mut _packet_data = stream.read_bits(len as usize * 8)?; let _ = stream.skip(len as usize * 8)?;
// TODO parse the packet data // TODO parse the packet data
Ok(UserCmdPacket { tick, sequence_out }) Ok(UserCmdPacket { tick, sequence_out })
} }