diff options
| author | Max Audron <audron@cocaine.farm> | 2025-02-22 22:59:01 +0100 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2025-02-22 22:59:01 +0100 |
| commit | b8ad94cd5061445a45d0790eee36014d34ad6817 (patch) | |
| tree | fb7d11e136b968d2f2b3593ba9163894baed8912 /src/message/signalproxy/syncmessage.rs | |
| parent | update dependencies and fix errors (diff) | |
replace deprecated failure crate with thiserror
this changes the public API in that all our methods now return a proper
ProtocolError crate. Needed change anyways to properly deal with all our
errors in the long run.
Will still need to do a pass through the crate to remove all existing
unwraps where it makes sense.
Diffstat (limited to 'src/message/signalproxy/syncmessage.rs')
| -rw-r--r-- | src/message/signalproxy/syncmessage.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/message/signalproxy/syncmessage.rs b/src/message/signalproxy/syncmessage.rs index 7e7aabc..d1f359b 100644 --- a/src/message/signalproxy/syncmessage.rs +++ b/src/message/signalproxy/syncmessage.rs @@ -1,3 +1,4 @@ +use crate::error::ProtocolError; use crate::message::MessageType; use crate::primitive::{Variant, VariantList}; use crate::{deserialize::Deserialize, serialize::Serialize}; @@ -85,7 +86,7 @@ pub struct SyncMessage { // impl Act for SyncMessage {} impl Serialize for SyncMessage { - fn serialize(&self) -> Result<Vec<std::primitive::u8>, failure::Error> { + fn serialize(&self) -> Result<Vec<std::primitive::u8>, ProtocolError> { let mut res = VariantList::new(); res.push(Variant::i32(MessageType::SyncMessage as i32)); @@ -100,7 +101,7 @@ impl Serialize for SyncMessage { } impl Deserialize for SyncMessage { - fn parse(b: &[std::primitive::u8]) -> Result<(std::primitive::usize, Self), failure::Error> { + fn parse(b: &[std::primitive::u8]) -> Result<(std::primitive::usize, Self), ProtocolError> { let (size, mut res) = VariantList::parse(&b)?; res.remove(0); |
