From cae6008c036a4fe690ef1b87d0c953fd05d9d4a6 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Sun, 22 Feb 2026 18:00:41 +0100 Subject: remove references from NetworkList input we do not need to reference stuff here and can just consume it --- src/message/signalproxy/translation.rs | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'src/message/signalproxy/translation.rs') diff --git a/src/message/signalproxy/translation.rs b/src/message/signalproxy/translation.rs index 40ebac1..b765133 100644 --- a/src/message/signalproxy/translation.rs +++ b/src/message/signalproxy/translation.rs @@ -122,7 +122,37 @@ where pub trait NetworkList { fn to_network_list(&self) -> Result; - fn from_network_list(input: &mut VariantList) -> Result + fn from_network_list(input: VariantList) -> Result where Self: std::marker::Sized; } + +// impl> NetworkList for T { +// fn from_network_list(input: VariantList) -> Result +// where +// Self: std::marker::Sized + NetworkMap, +// { +// let mut i = input.into_iter(); +// let mut map: VariantMap = VariantMap::new(); +// +// while let Some(key) = i.next() { +// let key: String = key.try_into()?; +// let value = i.next().ok_or(ProtocolError::MissingField(key.clone()))?; +// map.insert(key, value); +// } +// +// Self::from_network_map(&mut map) +// } +// +// fn to_network_list(&self) -> Result { +// let map = Self::to_network_map(self)?; +// +// let mut list = VariantList::new(); +// for (k, v) in map { +// list.push(Variant::ByteArray(k)); +// list.push(v); +// } +// +// Ok(list) +// } +// } -- cgit v1.2.3