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/bin/butck.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/bin/butck.rs') diff --git a/src/bin/butck.rs b/src/bin/butck.rs index 6a81fbb..0d0e102 100644 --- a/src/bin/butck.rs +++ b/src/bin/butck.rs @@ -3,11 +3,11 @@ use std::process::exit; use butchunker::{ chunker::{ context::ButckContext, - entry::{entry, print_help, print_version}, rw::error::{ButckRWError, ButckRWErrorKind}, }, - log::init_logger, + entry::{entry, print_help, print_version}, special_argument, special_flag, + utils::log::init_logger, }; use just_progress::{progress, renderer}; use log::error; @@ -104,6 +104,10 @@ fn handle_entry_result(r: Result<(), ButckRWError>) { ButckRWErrorKind::ChunkFailed(_chunk_failed) => error!("Chunk failed"), ButckRWErrorKind::IOError(error) => error!("IO error: {}", error), ButckRWErrorKind::InvalidBidxFormat => error!("Invalid bidx format"), + ButckRWErrorKind::ChunkingFailed(reason) => error!("Chunking failed: {}", reason), + ButckRWErrorKind::IndexFileWriteFailed(reason) => { + error!("Failed to write index file: {}", reason) + } }, } } -- cgit