diff options
Diffstat (limited to 'src/primitive/msgid.rs')
| -rw-r--r-- | src/primitive/msgid.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/primitive/msgid.rs b/src/primitive/msgid.rs index 509c1e7..a8048cf 100644 --- a/src/primitive/msgid.rs +++ b/src/primitive/msgid.rs @@ -4,19 +4,17 @@ pub struct MsgId( #[cfg(feature = "long-message-id")] pub i64, ); -use failure::Error; - -use crate::primitive::signedint; +use crate::error::ProtocolError; use crate::{deserialize::*, serialize::*}; impl Serialize for MsgId { - fn serialize(&self) -> Result<Vec<u8>, Error> { + fn serialize(&self) -> Result<Vec<u8>, ProtocolError> { self.0.serialize() } } impl Deserialize for MsgId { - fn parse(b: &[u8]) -> Result<(usize, Self), Error> { + fn parse(b: &[u8]) -> Result<(usize, Self), ProtocolError> { #[cfg(not(feature = "long-message-id"))] let (size, value) = i32::parse(b)?; #[cfg(feature = "long-message-id")] |
