From 81d3397c90260d1ab923f033740b63f59fe604ef Mon Sep 17 00:00:00 2001 From: jake Date: Sun, 10 Nov 2019 21:43:37 -0800 Subject: [PATCH] PSOPacketData::from_bytes needs + Seek --- psopacket/src/lib.rs | 2 +- src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/psopacket/src/lib.rs b/psopacket/src/lib.rs index a767a66..600edba 100644 --- a/psopacket/src/lib.rs +++ b/psopacket/src/lib.rs @@ -529,7 +529,7 @@ pub fn pso_packet_data(input: TokenStream) -> TokenStream { let impl_pso_data_packet = quote! { impl PSOPacketData for #name { - fn from_bytes(mut cur: &mut R) -> Result { + fn from_bytes(mut cur: &mut R) -> Result { Ok(#name { #(#from_bytes)* }) diff --git a/src/lib.rs b/src/lib.rs index f43ba13..5c9f0e5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,7 +7,7 @@ pub mod packet; pub mod character; pub mod util; -use std::io::Read; +use std::io::{Read, Seek}; #[derive(Debug, PartialEq)] pub enum PacketParseError { NotEnoughBytes, @@ -21,7 +21,7 @@ pub enum PacketParseError { trait PSOPacketData { //fn size(&self) -> usize; - fn from_bytes(cursor: &mut R) -> Result where Self: Sized; + fn from_bytes(cursor: &mut R) -> Result where Self: Sized; fn as_bytes(&self) -> Vec; }