diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-03-07 19:37:52 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-03-07 19:37:52 +0800 |
| commit | 9e7c0fd45e169929156bdb317b10d7bb3db65f8b (patch) | |
| tree | 94c1e0e6cafe996b7b7da8dfd6e1ff1a04539cda /src/chunker/context.rs | |
| parent | 22926ce29e3f8e040ec349401aeb6a77f32eae72 (diff) | |
Add callback support to chunk_stream_with and implement stream writing
Diffstat (limited to 'src/chunker/context.rs')
| -rw-r--r-- | src/chunker/context.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/chunker/context.rs b/src/chunker/context.rs index 79254f5..b7418f0 100644 --- a/src/chunker/context.rs +++ b/src/chunker/context.rs @@ -3,8 +3,9 @@ use std::{collections::HashMap, env::current_dir, path::PathBuf, process::exit, use log::{error, warn}; use crate::{ - chunker::constants::BUTCK_STORAGE_DIR_NAME, core::hash::ChunkWriteHash, special_argument, - special_flag, utils::file_input_solve::parse_path_input, + chunker::{constants::BUTCK_STORAGE_DIR_NAME, rw::storage::hash::ChunkWriteHash}, + special_argument, special_flag, + utils::file_input_solve::parse_path_input, }; #[derive(Debug, Default)] @@ -69,9 +70,10 @@ impl ButckContext { fn apply_stream_read(&mut self, args: &mut Vec<String>) { if let Some(size_str) = special_argument!(args, "-S", "--stream-read") - && let Ok(size) = size_str.parse::<u32>() { - self.stream_read = Some(size); - } + && let Ok(size) = size_str.parse::<u32>() + { + self.stream_read = Some(size); + } } fn apply_memmap_read(&mut self, args: &mut Vec<String>) -> bool { |
