File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,17 @@ fn main() -> Result<()> {
164
164
165
165
tracing:: info!( "Copy completed successfully in {:?}." , start_time. elapsed( ) ) ;
166
166
167
+ let hash_progress_cb = |info | {
168
+ match info {
169
+ file_hashing:: ProgressInfo :: Yield ( p) => {
170
+ tracing:: info!( "Hashing... ({}%)" , p) ;
171
+ } ,
172
+ file_hashing:: ProgressInfo :: Error ( error) => {
173
+ panic ! ( "Failed to hash file: {:?}" , error)
174
+ }
175
+ }
176
+ } ;
177
+
167
178
if args. verify {
168
179
tracing:: info!( "Computing hash..." ) ;
169
180
let mut source_hash = Blake2s256 :: new ( ) ;
@@ -174,7 +185,7 @@ fn main() -> Result<()> {
174
185
destination_path,
175
186
& mut dst_hash,
176
187
num_cpus:: get ( ) ,
177
- |_| { } ,
188
+ hash_progress_cb
178
189
) ?;
179
190
} else {
180
191
file_hashing:: get_hash_file ( source_path, & mut source_hash) ?;
You can’t perform that action at this time.
0 commit comments