mirror of
https://github.com/zyllian/classics.git
synced 2025-01-18 11:47:14 -08:00
comment out unused packet methods
This commit is contained in:
parent
d56bf8b7e4
commit
8bdb6e4ee5
1 changed files with 20 additions and 20 deletions
|
@ -62,27 +62,27 @@ impl<'p> PacketReader<'p> {
|
||||||
Some(String::from_iter(chars).trim().to_string())
|
Some(String::from_iter(chars).trim().to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// gets the next array of the given length in the packet, if any
|
// /// gets the next array of the given length in the packet, if any
|
||||||
fn next_array_of_length(&mut self, len: usize) -> Option<Vec<u8>> {
|
// fn next_array_of_length(&mut self, len: usize) -> Option<Vec<u8>> {
|
||||||
let mut bytes: Vec<u8> = Vec::new();
|
// let mut bytes: Vec<u8> = Vec::new();
|
||||||
let mut append = true;
|
// let mut append = true;
|
||||||
for _ in 0..len {
|
// for _ in 0..len {
|
||||||
let b = self.next_u8()?;
|
// let b = self.next_u8()?;
|
||||||
if append {
|
// if append {
|
||||||
if b == 0 {
|
// if b == 0 {
|
||||||
append = false;
|
// append = false;
|
||||||
} else {
|
// } else {
|
||||||
bytes.push(b);
|
// bytes.push(b);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
Some(bytes)
|
// Some(bytes)
|
||||||
}
|
// }
|
||||||
|
|
||||||
/// gets the next array of default size in the packet, if any
|
// /// gets the next array of default size in the packet, if any
|
||||||
fn next_array(&mut self) -> Option<Vec<u8>> {
|
// fn next_array(&mut self) -> Option<Vec<u8>> {
|
||||||
self.next_array_of_length(ARRAY_LENGTH)
|
// self.next_array_of_length(ARRAY_LENGTH)
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// helper for writing a packet
|
/// helper for writing a packet
|
||||||
|
|
Loading…
Add table
Reference in a new issue