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/rpccall.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/rpccall.rs')
| -rw-r--r-- | src/message/signalproxy/rpccall.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/message/signalproxy/rpccall.rs b/src/message/signalproxy/rpccall.rs index e485f6b..04c75cb 100644 --- a/src/message/signalproxy/rpccall.rs +++ b/src/message/signalproxy/rpccall.rs @@ -1,3 +1,4 @@ +use crate::error::ProtocolError; use crate::message::MessageType; use crate::primitive::Message; use crate::primitive::{Variant, VariantList}; @@ -21,7 +22,7 @@ pub struct DisplayMessage { // } impl Serialize for RpcCall { - 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::RpcCall as i32)); @@ -39,7 +40,7 @@ impl Serialize for RpcCall { } impl Deserialize for RpcCall { - 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); |
