Merge pull request #982 from twmsh/master

update bytes(protobuf types) mapping, from Vec<u8> to bytes:Byte
This commit is contained in:
RustDesk authored and GitHub committed 2022-07-21 18:09:14 +08:00
commit 416832a1ed
17 files changed
+46 -35

No files matched your search

+2 -2
View File
@@ -48,7 +48,7 @@ pub fn create_clipboard_msg(content: String) -> Message {
let mut msg = Message::new();
msg.set_clipboard(Clipboard {
compress,
content,
content:content.into(),
..Default::default()
});
msg
@@ -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
clipboard.content.into()
};
if let Ok(content) = String::from_utf8(content) {
if content.is_empty() {