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/handshake/clientinitack.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/handshake/clientinitack.rs')
| -rw-r--r-- | src/message/handshake/clientinitack.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<VariantMap> 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(), } } } |
