From 9e7c0fd45e169929156bdb317b10d7bb3db65f8b Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 7 Mar 2026 19:37:52 +0800 Subject: Add callback support to chunk_stream_with and implement stream writing --- src/chunker/rw/storage/write.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/chunker/rw/storage/write.rs') diff --git a/src/chunker/rw/storage/write.rs b/src/chunker/rw/storage/write.rs index 8b3acc7..9348901 100644 --- a/src/chunker/rw/storage/write.rs +++ b/src/chunker/rw/storage/write.rs @@ -1,4 +1,7 @@ -use std::{collections::HashMap, path::PathBuf}; +use std::{ + collections::HashMap, + path::{Path, PathBuf}, +}; use log::trace; @@ -73,7 +76,7 @@ async fn write_file( } } -pub fn get_index_file_name(path: &PathBuf, ctx: &ButckContext) -> PathBuf { +pub fn get_index_file_name(path: &Path, ctx: &ButckContext) -> PathBuf { let output_file = if let Some(output_file) = &ctx.output_file { return output_file.clone(); } else { -- cgit