upgrade bytes to 1.2
This commit is contained in:
parent
6db3a2e85c
commit
16b7c7c716
@ -55,7 +55,7 @@ rpassword = "7.0"
|
||||
base64 = "0.13"
|
||||
sysinfo = "0.24"
|
||||
num_cpus = "1.13"
|
||||
bytes = "1.1"
|
||||
bytes = "1.2"
|
||||
default-net = "0.11.0"
|
||||
wol-rs = "0.9.1"
|
||||
|
||||
|
@ -11,7 +11,7 @@ protobuf = { version = "3.1", features = ["with-bytes"] }
|
||||
tokio = { version = "1.20", features = ["full"] }
|
||||
tokio-util = { version = "0.7", features = ["full"] }
|
||||
futures = "0.3"
|
||||
bytes = "1.1"
|
||||
bytes = "1.2"
|
||||
log = "0.4"
|
||||
env_logger = "0.9"
|
||||
socket2 = { version = "0.3", features = ["reuseport"] }
|
||||
|
@ -215,7 +215,7 @@ impl Client {
|
||||
} else {
|
||||
peer_nat_type = ph.nat_type();
|
||||
is_local = ph.is_local();
|
||||
signed_id_pk = ph.pk.as_ref().to_vec();
|
||||
signed_id_pk = ph.pk.into();
|
||||
relay_server = ph.relay_server;
|
||||
peer_addr = AddrMangle::decode(&ph.socket_addr);
|
||||
log::info!("Hole Punched {} = {}", peer, peer_addr);
|
||||
|
@ -156,7 +156,7 @@ pub fn msg_2_clip(msg: Cliprdr) -> Option<ClipbaordFile> {
|
||||
Some(ClipbaordFile::ServerFormatDataResponse {
|
||||
conn_id: data.conn_id,
|
||||
msg_flags: data.msg_flags,
|
||||
format_data: data.format_data.as_ref().to_vec(),
|
||||
format_data: data.format_data.into(),
|
||||
})
|
||||
}
|
||||
Some(cliprdr::Union::FileContentsRequest(data)) => {
|
||||
@ -177,7 +177,7 @@ pub fn msg_2_clip(msg: Cliprdr) -> Option<ClipbaordFile> {
|
||||
conn_id: data.conn_id,
|
||||
msg_flags: data.msg_flags,
|
||||
stream_id: data.stream_id,
|
||||
requested_data: data.requested_data.as_ref().to_vec(),
|
||||
requested_data: data.requested_data.into(),
|
||||
})
|
||||
}
|
||||
_ => None,
|
||||
|
@ -79,7 +79,7 @@ pub fn update_clipboard(clipboard: Clipboard, old: Option<&Arc<Mutex<String>>>)
|
||||
let content = if clipboard.compress {
|
||||
decompress(&clipboard.content)
|
||||
} else {
|
||||
clipboard.content.as_ref().to_vec()
|
||||
clipboard.content.into()
|
||||
};
|
||||
if let Ok(content) = String::from_utf8(content) {
|
||||
if content.is_empty() {
|
||||
|
@ -266,7 +266,7 @@ impl RendezvousMediator {
|
||||
|
||||
async fn handle_request_relay(&self, rr: RequestRelay, server: ServerPtr) -> ResultType<()> {
|
||||
self.create_relay(
|
||||
rr.socket_addr.as_ref().to_vec(),
|
||||
rr.socket_addr.into(),
|
||||
rr.relay_server,
|
||||
rr.uuid,
|
||||
server,
|
||||
@ -353,7 +353,7 @@ impl RendezvousMediator {
|
||||
{
|
||||
let uuid = Uuid::new_v4().to_string();
|
||||
return self
|
||||
.create_relay(ph.socket_addr.as_ref().to_vec(), relay_server, uuid, server, true, true)
|
||||
.create_relay(ph.socket_addr.into(), relay_server, uuid, server, true, true)
|
||||
.await;
|
||||
}
|
||||
let peer_addr = AddrMangle::decode(&ph.socket_addr);
|
||||
|
@ -1063,7 +1063,7 @@ impl Connection {
|
||||
self.send_fs(ipc::FS::WriteBlock {
|
||||
id: block.id,
|
||||
file_num: block.file_num,
|
||||
data: block.data.as_ref().to_vec(),
|
||||
data: block.data.into(),
|
||||
compressed: block.compressed,
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user