aboutsummaryrefslogtreecommitdiff
path: root/src/message/handshake/mod.rs
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2021-04-05 18:03:46 +0200
committerMax Audron <audron@cocaine.farm>2021-04-05 18:03:46 +0200
commitd7488b8040278c2cf9cd1b1eead206efe408cd9f (patch)
tree1188190a730e6c0d4277c588545c5ff557afb3cd /src/message/handshake/mod.rs
parentWIP: impl signalproxy types (diff)
WIP: impl more signalproxy objects
Diffstat (limited to 'src/message/handshake/mod.rs')
-rw-r--r--src/message/handshake/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/message/handshake/mod.rs b/src/message/handshake/mod.rs
index c180c5e..029eb86 100644
--- a/src/message/handshake/mod.rs
+++ b/src/message/handshake/mod.rs
@@ -24,7 +24,7 @@ pub use protocol::*;
pub use sessioninit::*;
pub use types::*;
-use crate::primitive::{Variant, VariantMap};
+use crate::primitive::VariantMap;
use crate::{HandshakeDeserialize, HandshakeSerialize};
#[derive(Debug, Clone)]
@@ -56,7 +56,7 @@ impl HandshakeDeserialize for HandshakeMessage {
fn parse(b: &[u8]) -> Result<(usize, Self), failure::Error> {
let (size, res) = VariantMap::parse(b)?;
- let msgtype = match_variant!(&res["MsgType"], Variant::String);
+ let msgtype: String = (&res["MsgType"]).into();
match msgtype.as_str() {
"ClientInit" => Ok((size, HandshakeMessage::ClientInit(res.into()))),
"ClientInitAck" => Ok((size, HandshakeMessage::ClientInitAck(res.into()))),