A few simplifications.

This commit is contained in:
Adam Ierymenko 2021-11-30 16:52:22 -05:00
parent cf6ffdb894
commit c99fc2f36e
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
4 changed files with 2 additions and 18 deletions

View file

@ -21,4 +21,4 @@ heapless = "0.7.7"
subtle = "2.4.1" subtle = "2.4.1"
[dev-dependencies] [dev-dependencies]
quickcheck = "^1" quickcheck = "1.0.3"

View file

@ -14,11 +14,9 @@ panic = 'abort'
[dependencies] [dependencies]
zerotier-core-crypto = { path = "../zerotier-core-crypto" } zerotier-core-crypto = { path = "../zerotier-core-crypto" }
base64 = "^0" base64 = "^0"
urlencoding = "^2"
lz4_flex = { version = "^0", features = ["safe-encode", "safe-decode", "checked-decode"] } lz4_flex = { version = "^0", features = ["safe-encode", "safe-decode", "checked-decode"] }
dashmap = "^4" dashmap = "^4"
parking_lot = "^0" parking_lot = "^0"
simple-error = "^0"
[target."cfg(not(windows))".dependencies] [target."cfg(not(windows))".dependencies]
libc = "^0" libc = "^0"

View file

@ -351,7 +351,7 @@ impl ToString for Endpoint {
Endpoint::IpUdp(ip) => format!("udp:{}", ip.to_string()), Endpoint::IpUdp(ip) => format!("udp:{}", ip.to_string()),
Endpoint::IpTcp(ip) => format!("tcp:{}", ip.to_string()), Endpoint::IpTcp(ip) => format!("tcp:{}", ip.to_string()),
Endpoint::Http(url) => url.clone(), Endpoint::Http(url) => url.clone(),
Endpoint::WebRTC(offer) => format!("webrtc:{}", urlencoding::encode(String::from_utf8_lossy(offer.as_slice()).as_ref())), Endpoint::WebRTC(offer) => format!("webrtc:{}", base64::encode(offer.as_slice())),
} }
} }
} }

View file

@ -1625,12 +1625,6 @@ version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335"
[[package]]
name = "simple-error"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc47a29ce97772ca5c927f75bac34866b16d64e07f330c3248e2d7226623901b"
[[package]] [[package]]
name = "simple-mutex" name = "simple-mutex"
version = "1.1.5" version = "1.1.5"
@ -1990,12 +1984,6 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "urlencoding"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68b90931029ab9b034b300b797048cf23723400aa757e8a2bfb9d748102f9821"
[[package]] [[package]]
name = "value-bag" name = "value-bag"
version = "1.0.0-alpha.8" version = "1.0.0-alpha.8"
@ -2234,8 +2222,6 @@ dependencies = [
"libc", "libc",
"lz4_flex", "lz4_flex",
"parking_lot", "parking_lot",
"simple-error",
"urlencoding",
"winapi", "winapi",
"zerotier-core-crypto", "zerotier-core-crypto",
] ]