aboutsummaryrefslogtreecommitdiff
path: root/src/message/handshake/clientlogin.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/message/handshake/clientlogin.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/message/handshake/clientlogin.rs b/src/message/handshake/clientlogin.rs
index c589810..b619e48 100644
--- a/src/message/handshake/clientlogin.rs
+++ b/src/message/handshake/clientlogin.rs
@@ -21,10 +21,10 @@ impl HandshakeSerialize for ClientLogin {
}
impl From<VariantMap> for ClientLogin {
- fn from(input: VariantMap) -> Self {
+ fn from(mut input: VariantMap) -> Self {
ClientLogin {
- user: match_variant!(input.get("User").unwrap(), Variant::String),
- password: match_variant!(input.get("Password").unwrap(), Variant::String),
+ user: input.remove("User").unwrap().try_into().unwrap(),
+ password: input.remove("Password").unwrap().try_into().unwrap(),
}
}
}