Skip to content

Commit 5649312

Browse files
committed
clean up
1 parent 61419b1 commit 5649312

File tree

4 files changed

+4
-224
lines changed

4 files changed

+4
-224
lines changed

Cargo.lock

Lines changed: 0 additions & 219 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

anafi-rs/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ edition = "2018"
66

77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88
[dependencies]
9-
anyhow = "1.0"
109
arsdk-rs = { path = "../arsdk-rs" }
1110

1211
[dev-dependencies]
1312
# Used for examples
1413
env_logger = "0.7"
1514
log = "0.4"
16-
tokio = {version = "0.2", features = ["rt-threaded", "macros", "time"]}
15+
tokio = {version = "0.2.22", features = ["rt-threaded", "macros", "time"]}

arsdk-rs/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ license = "MIT/Apache-2.0"
88
keywords = ["drone", "parrot"]
99

1010
[dependencies]
11-
anyhow = "1.0"
1211
thiserror = "1.0"
1312
pnet = "0.25"
1413
serde = {version = "1.0", features = ["derive"]}

arsdk-rs/src/handshake.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ pub struct Response {
4040
pub qos_mode: u8,
4141
// @TODO: Check what this field is for **and** if it's a bool at all
4242
/// Bool?!
43-
proto_v: u8,
43+
#[serde(default)]
44+
pub proto_v: Option<u8>,
4445
}
4546

4647
with_prefix!(prefix_arstream2_client "arstream2_client_");
@@ -106,7 +107,7 @@ pub(crate) fn perform_handshake(
106107

107108
handshake_stream.shutdown(Shutdown::Both)?;
108109

109-
let response: Response = serde_json::from_str(&response_string)?;
110+
let response: Response = serde_json::from_str(&response_string.trim_end_matches('\u{0}'))?;
110111

111112
if response.status != 0 {
112113
Err(Error::ConnectionRefused(response))

0 commit comments

Comments
 (0)