Fixes from rebase

This commit is contained in:
QuantumEntangledAndy committed 2020-10-15 11:15:38 +07:00
1 parent d0f760ea7b
commit edf2f25952
3 files changed
+18 -4

No files matched your search

+15 -1
View File
@@ -53,6 +53,15 @@ impl BcXml {
}
}
impl Extension {
pub fn try_parse(s: impl Read) -> Result<Self, String> {
yaserde::de::from_reader(s)
}
pub fn serialize<W: Write>(&self, w: W) -> Result<W, String> {
yaserde::ser::serialize_with_writer(self, w, &Config::default())
}
}
#[derive(PartialEq, Eq, Default, Debug, YaDeserialize, YaSerialize)]
pub struct Encryption {
#[yaserde(attribute)]
@@ -123,7 +132,12 @@ pub struct Extension {
#[yaserde(attribute)]
pub version: String,
#[yaserde(rename = "binaryData")]
pub binary_data: u32,
pub binary_data: Option<u32>,
#[yaserde(rename = "userName")]
pub user_name: Option<String>,
pub token: Option<String>,
#[yaserde(rename = "channelId")]
pub channel_id: Option<u32>,
}
#[derive(PartialEq, Eq, Default, Debug, YaDeserialize, YaSerialize)]
+2 -2
View File
@@ -147,7 +147,7 @@ impl BcCamera {
Some(BcPayloads::BcXml(BcXml {
encryption: Some(encryption),
..
}),
})),
..
}) => {
nonce = encryption.nonce;
@@ -207,7 +207,7 @@ impl BcCamera {
Some(BcPayloads::BcXml(BcXml {
device_info: Some(info),
..
}),
})),
..
}) => {
// Login succeeded!
+1 -1
View File
@@ -42,7 +42,7 @@ impl BcCamera {
..
}),
..
}),
})),
..
}) = msg.body
{