From b8ad94cd5061445a45d0790eee36014d34ad6817 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Sat, 22 Feb 2025 22:59:01 +0100 Subject: 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. --- src/message/signalproxy/rpccall.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/message/signalproxy/rpccall.rs') 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, failure::Error> { + fn serialize(&self) -> Result, 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); -- cgit v1.2.3