diff options
Diffstat (limited to 'src/primitive/bufferinfo.rs')
| -rw-r--r-- | src/primitive/bufferinfo.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/primitive/bufferinfo.rs b/src/primitive/bufferinfo.rs index 97d9408..a87c418 100644 --- a/src/primitive/bufferinfo.rs +++ b/src/primitive/bufferinfo.rs @@ -1,8 +1,6 @@ use std::vec::Vec; -use failure::Error; - -use crate::{deserialize::*, serialize::*}; +use crate::{deserialize::*, error::ProtocolError, serialize::*}; /// The BufferInfo struct represents a BufferInfo as received in IRC /// @@ -20,7 +18,7 @@ pub struct BufferInfo { } impl Serialize for BufferInfo { - fn serialize(&self) -> Result<Vec<u8>, Error> { + fn serialize(&self) -> Result<Vec<u8>, ProtocolError> { let mut values: Vec<u8> = Vec::new(); values.append(&mut i32::serialize(&self.id)?); @@ -34,7 +32,7 @@ impl Serialize for BufferInfo { } impl Deserialize for BufferInfo { - fn parse(b: &[u8]) -> Result<(usize, Self), Error> { + fn parse(b: &[u8]) -> Result<(usize, Self), ProtocolError> { let (_, id) = i32::parse(&b[0..4])?; let (_, network_id) = i32::parse(&b[4..8])?; let (_, buffer_type) = i16::parse(&b[8..10])?; |
