From 024eb3df4a0786a92033baea123aa779998cdc28 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Sun, 22 Feb 2026 14:06:16 +0100 Subject: NetworkList and signalproxy objects error handling --- src/primitive/variant.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/primitive/variant.rs') diff --git a/src/primitive/variant.rs b/src/primitive/variant.rs index f39d405..b201b46 100644 --- a/src/primitive/variant.rs +++ b/src/primitive/variant.rs @@ -92,7 +92,7 @@ where T: std::convert::TryFrom + Into + Clone + std::hash::Hash + std::cmp::Eq, S: std::convert::TryFrom + Into + Clone + std::hash::Hash + std::cmp::Eq, { - fn to_network_list(&self) -> VariantList { + fn to_network_list(&self) -> Result { let mut res = Vec::with_capacity(self.len() * 2); self.iter().for_each(|(k, v)| { @@ -100,10 +100,10 @@ where res.push((*v).clone().into()); }); - res + Ok(res) } - fn from_network_list(input: &mut VariantList) -> Self { + fn from_network_list(input: &mut VariantList) -> Result { let mut res = HashMap::with_capacity(input.len() / 2); input.iter().tuples().for_each(|(k, v)| { @@ -119,7 +119,7 @@ where ); }); - res + Ok(res) } } -- cgit v1.2.3