mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-05 09:21:30 +03:00
Merge pull request #982 from twmsh/master
update bytes(protobuf types) mapping, from Vec<u8> to bytes:Byte
This commit is contained in:
@@ -19,6 +19,7 @@ use parity_tokio_ipc::{
|
||||
};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use std::{collections::HashMap, sync::atomic::Ordering};
|
||||
use bytes::Bytes;
|
||||
#[cfg(not(windows))]
|
||||
use std::{fs::File, io::prelude::*};
|
||||
|
||||
@@ -75,7 +76,7 @@ pub enum FS {
|
||||
WriteBlock {
|
||||
id: i32,
|
||||
file_num: i32,
|
||||
data: Vec<u8>,
|
||||
data: Bytes,
|
||||
compressed: bool,
|
||||
},
|
||||
WriteDone {
|
||||
@@ -562,8 +563,8 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn send_raw(&mut self, data: Vec<u8>) -> ResultType<()> {
|
||||
self.inner.send(bytes::Bytes::from(data)).await?;
|
||||
pub async fn send_raw(&mut self, data: Bytes) -> ResultType<()> {
|
||||
self.inner.send(data).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user