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/handshake/clientinitack.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/message/handshake/clientinitack.rs') diff --git a/src/message/handshake/clientinitack.rs b/src/message/handshake/clientinitack.rs index 610cdc0..21e65de 100644 --- a/src/message/handshake/clientinitack.rs +++ b/src/message/handshake/clientinitack.rs @@ -50,11 +50,11 @@ impl From for ClientInitAck { ClientInitAck { // TODO make this compatible with older clients core_features: 0, - core_configured: match_variant!(input.get("Configured").unwrap(), Variant::bool), - storage_backends: match_variant!(input.get("StorageBackends").unwrap(), Variant::VariantList), + core_configured: input.get("Configured").unwrap().try_into().unwrap(), + storage_backends: input.get("StorageBackends").unwrap().try_into().unwrap(), #[cfg(feature = "authenticators")] - authenticators: match_variant!(input.get("Authenticators").unwrap(), Variant::VariantList), - feature_list: match_variant!(input.get("FeatureList").unwrap(), Variant::StringList), + authenticators: input.get("Authenticators").unwrap().try_into().unwrap(), + feature_list: input.get("FeatureList").unwrap().try_into().unwrap(), } } } -- cgit v1.2.3