diff options
Diffstat (limited to '')
| -rw-r--r-- | src/message/handshake/clientloginreject.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/message/handshake/clientloginreject.rs b/src/message/handshake/clientloginreject.rs index 964ce0c..c4f09cc 100644 --- a/src/message/handshake/clientloginreject.rs +++ b/src/message/handshake/clientloginreject.rs @@ -17,14 +17,14 @@ impl HandshakeSerialize for ClientLoginReject { Variant::String("ClientLoginReject".to_string()), ); values.insert("ErrorString".to_string(), Variant::String(self.error.clone())); - return HandshakeSerialize::serialize(&values); + HandshakeSerialize::serialize(&values) } } impl From<VariantMap> for ClientLoginReject { - fn from(input: VariantMap) -> Self { + fn from(mut input: VariantMap) -> Self { ClientLoginReject { - error: match_variant!(input.get("ErrorString").unwrap(), Variant::String), + error: input.remove("ErrorString").unwrap().try_into().unwrap(), } } } |
