enable serde feature of bytes, modify struct WriteBlock using Bytes

This commit is contained in:
tom
2022-07-21 16:07:19 +08:00
parent 16b7c7c716
commit 9ab955bb8e
5 changed files with 8 additions and 7 deletions

View File

@@ -17,6 +17,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::*};
@@ -63,7 +64,7 @@ pub enum FS {
WriteBlock {
id: i32,
file_num: i32,
data: Vec<u8>,
data: Bytes,
compressed: bool,
},
WriteDone {