diff options
| author | Max Audron <audron@cocaine.farm> | 2021-11-29 14:18:30 +0100 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2021-11-29 14:27:09 +0100 |
| commit | 6da4613578f1effb371f4f3dd6605c1dff16b0b7 (patch) | |
| tree | 655c42ce4fa483d1db149d2f3db5cc37b558ab3f /src/message/signalproxy/initdata.rs | |
| parent | add NetworkList impl for CoreInfo (diff) | |
rework SyncProxy to use globally available channels
the SyncProxy is now a globally available OnceCell that transparently
offers a struct with methods to send syncmessages and rpccalls.
This allows me to get rid of the globally passed around syncproxy var.
The Syncable trait provides default implementations that access this
global so the library user usually does not need to use it directly.
Further the Syncable trait now provides default implementations for it's
methods and only a const for the CLASS name must be set.
It isn't very idiomatic rust and takes away some freedom from the
library user but i think that it's an overall nicer solution and
simplifies the code big time.
Diffstat (limited to 'src/message/signalproxy/initdata.rs')
| -rw-r--r-- | src/message/signalproxy/initdata.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/message/signalproxy/initdata.rs b/src/message/signalproxy/initdata.rs index 9e54690..a391b4a 100644 --- a/src/message/signalproxy/initdata.rs +++ b/src/message/signalproxy/initdata.rs @@ -32,13 +32,14 @@ impl Deserialize for InitData { res.remove(0); let class_name: String = res.remove(0).into(); + let object_name: String = res.remove(0).into(); Ok(( size, Self { class_name: class_name.clone(), - object_name: res.remove(0).into(), - init_data: Types::from_network(class_name.as_str(), &mut res), + object_name: object_name.clone(), + init_data: Types::from_network(class_name.as_str(), object_name.as_str(), &mut res), }, )) } |
