From 8882c121f83cf4513eaee7515d6dcea133a65d69 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Sat, 21 Feb 2026 13:32:00 +0100 Subject: 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 --- src/message/signalproxy/rpccall/identity.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/message/signalproxy/rpccall/identity.rs') diff --git a/src/message/signalproxy/rpccall/identity.rs b/src/message/signalproxy/rpccall/identity.rs index 288dec5..1672e98 100644 --- a/src/message/signalproxy/rpccall/identity.rs +++ b/src/message/signalproxy/rpccall/identity.rs @@ -34,8 +34,8 @@ impl RpcCallType for CreateIdentity { Ok(( size, CreateIdentity { - identity: match_variant!(input.remove(0), Variant::Identity), - additional: match_variant!(input.remove(0), Variant::VariantMap), + identity: input.remove(0).try_into().unwrap(), + additional: input.remove(0).try_into().unwrap(), } .into(), )) @@ -68,7 +68,7 @@ impl RpcCallType for RemoveIdentity { Ok(( size, Self { - identity_id: match_variant!(input.remove(0), Variant::IdentityId), + identity_id: input.remove(0).try_into().unwrap(), } .into(), )) @@ -101,7 +101,7 @@ impl RpcCallType for IdentityCreated { Ok(( size, IdentityCreated { - identity: match_variant!(input.remove(0), Variant::Identity), + identity: input.remove(0).try_into().unwrap(), } .into(), )) @@ -134,7 +134,7 @@ impl RpcCallType for IdentityRemoved { Ok(( size, Self { - identity_id: match_variant!(input.remove(0), Variant::IdentityId), + identity_id: input.remove(0).try_into().unwrap(), } .into(), )) -- cgit v1.2.3