diff options
| author | Max Audron <me@audron.dev> | 2026-02-21 13:32:00 +0100 |
|---|---|---|
| committer | Max Audron <me@audron.dev> | 2026-02-21 13:32:00 +0100 |
| commit | 8882c121f83cf4513eaee7515d6dcea133a65d69 (patch) | |
| tree | e2818c5d99f209159fd904e0c75d4bc30c262e82 /src/message/signalproxy/rpccall/network.rs | |
| parent | remove old readme.org (diff) | |
replace all match_variant instances with try_into
the match_variant macro was unclear, unreadable and no longer needed as
we have automaticly derived from implementations for all Variant enum
fields now
Diffstat (limited to 'src/message/signalproxy/rpccall/network.rs')
| -rw-r--r-- | src/message/signalproxy/rpccall/network.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/message/signalproxy/rpccall/network.rs b/src/message/signalproxy/rpccall/network.rs index 18f9f74..aeb3f80 100644 --- a/src/message/signalproxy/rpccall/network.rs +++ b/src/message/signalproxy/rpccall/network.rs @@ -33,8 +33,8 @@ impl RpcCallType for CreateNetwork { Ok(( size, Self { - network: match_variant!(input.remove(0), Variant::NetworkInfo), - channels: match_variant!(input.remove(0), Variant::StringList), + network: input.remove(0).try_into().unwrap(), + channels: input.remove(0).try_into().unwrap(), } .into(), )) @@ -67,7 +67,7 @@ impl RpcCallType for RemoveNetwork { Ok(( size, Self { - network_id: match_variant!(input.remove(0), Variant::NetworkId), + network_id: input.remove(0).try_into().unwrap(), } .into(), )) @@ -100,7 +100,7 @@ impl RpcCallType for NetworkCreated { Ok(( size, Self { - network_id: match_variant!(input.remove(0), Variant::NetworkId), + network_id: input.remove(0).try_into().unwrap(), } .into(), )) @@ -133,7 +133,7 @@ impl RpcCallType for NetworkRemoved { Ok(( size, Self { - network_id: match_variant!(input.remove(0), Variant::NetworkId), + network_id: input.remove(0).try_into().unwrap(), } .into(), )) |
