mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-07-08 01:31:53 +08:00
Update fastcdc from 3.2.1 to 4.0.1
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -799,9 +799,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fastcdc"
|
name = "fastcdc"
|
||||||
version = "3.2.1"
|
version = "4.0.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bf51ceb43e96afbfe4dd5c6f6082af5dfd60e220820b8123792d61963f2ce6bc"
|
checksum = "77af40d8a8dadb92dc178569a5f5edb5f3056e98255c2de48ab5d59a52892e0c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fastrand"
|
name = "fastrand"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ digest-io = { version = "0.1", optional = true }
|
|||||||
emote-psb = { version = "0.5", optional = true , features = ["serde"] }
|
emote-psb = { version = "0.5", optional = true , features = ["serde"] }
|
||||||
encoding = "0.2"
|
encoding = "0.2"
|
||||||
fancy-regex = { version = "0.18", optional = true }
|
fancy-regex = { version = "0.18", optional = true }
|
||||||
fastcdc = { version = "3.2", optional = true }
|
fastcdc = { version = "4.0", optional = true }
|
||||||
flate2 = { version = "1.1", optional = true }
|
flate2 = { version = "1.1", optional = true }
|
||||||
include-flate = { version = "0.3", optional = true }
|
include-flate = { version = "0.3", optional = true }
|
||||||
int-enum = { version = "1.2", optional = true }
|
int-enum = { version = "1.2", optional = true }
|
||||||
|
|||||||
@@ -53,7 +53,12 @@ impl Segmenter for FastCdcSegmenter {
|
|||||||
&'a self,
|
&'a self,
|
||||||
data: &'a mut Reader,
|
data: &'a mut Reader,
|
||||||
) -> Box<dyn Iterator<Item = Result<Vec<u8>>> + 'a> {
|
) -> Box<dyn Iterator<Item = Result<Vec<u8>>> + 'a> {
|
||||||
let cdc = StreamCDC::new(data, self.min_size, self.avg_size, self.max_size);
|
let cdc = StreamCDC::new(
|
||||||
|
data,
|
||||||
|
self.min_size as usize,
|
||||||
|
self.avg_size as usize,
|
||||||
|
self.max_size as usize,
|
||||||
|
);
|
||||||
Box::new(cdc.map(|chunk| Ok(chunk?.data)))
|
Box::new(cdc.map(|chunk| Ok(chunk?.data)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user