|
|
@ -222,7 +222,7 @@ pub fn pso_packet(attr: TokenStream, item: TokenStream) -> TokenStream { |
|
|
|
|
|
|
|
let psopacket = quote! {
|
|
|
|
impl PSOPacket for #this_struct {
|
|
|
|
fn from_bytes(data: &Vec<u8>) -> Result<#this_struct, PacketParseError> {
|
|
|
|
fn from_bytes(data: &[u8]) -> Result<#this_struct, PacketParseError> {
|
|
|
|
let mut cur = std::io::Cursor::new(data);
|
|
|
|
let mut b: [u8; 2] = [0; 2];
|
|
|
|
cur.read(&mut b).unwrap();
|
|
|
|