diff --git a/src/buffer.rs b/src/buffer.rs index 6f19edc..420be8b 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -46,8 +46,9 @@ impl<'a, B: ByteOrder> Buffer<'a, B> { /// Returns the length of the buffer data. pub const fn data_length(&self) -> usize { self.data.len() } - // Added for legacy support just for the refactoring - // Not Tested + // TODO: Look into this to make it take ownership of data, not borrowing it + // There are many instances where we transform this to a vector. + /// Returns the remaining bytes that have not been read. pub fn remaining_bytes(&self) -> &[u8] { &self.data[self.cursor ..] } /// Moves the cursor forward or backward by a specified offset. diff --git a/src/protocols/quake/client.rs b/src/protocols/quake/client.rs index 5af6ab1..3f14c8f 100644 --- a/src/protocols/quake/client.rs +++ b/src/protocols/quake/client.rs @@ -45,7 +45,7 @@ fn get_data(address: &SocketAddr, timeout_settings: Option< bufferer.move_cursor(response_header.len() as isize)?; - Ok(bufferer.remaining_bytes().to_vec()) //TODO: Maybe fix? + Ok(bufferer.remaining_bytes().to_vec()) } fn get_server_values(bufferer: &mut Buffer) -> GDResult> {