File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -361,16 +361,7 @@ pub(crate) fn check_repository<P: ProgressBars, S: Open>(
361361 p. finish ( ) ;
362362 }
363363
364- let mut summary = Arc :: try_unwrap ( summary)
365- . map_err ( |_err| RusticError :: new ( ErrorKind :: Internal , "Error unwrapping Mutex from Arc." ) ) ?
366- . into_inner ( )
367- . map_err ( |err| {
368- RusticError :: with_source (
369- ErrorKind :: Internal ,
370- "Mutex poisoned while getting summary for check command." ,
371- err,
372- )
373- } ) ?;
364+ let mut summary = Summary :: retrieve_from_arc_mutex ( summary) ?;
374365
375366 summary. complete ( ) ;
376367
@@ -507,16 +498,7 @@ fn check_cache_files(
507498
508499 p. finish ( ) ;
509500
510- let mut summary = Arc :: try_unwrap ( summary)
511- . map_err ( |_err| RusticError :: new ( ErrorKind :: Internal , "Error unwrapping Mutex from Arc." ) ) ?
512- . into_inner ( )
513- . map_err ( |err| {
514- RusticError :: with_source (
515- ErrorKind :: Internal ,
516- "Mutex poisoned while getting summary for check command." ,
517- err,
518- )
519- } ) ?;
501+ let mut summary = Summary :: retrieve_from_arc_mutex ( summary) ?;
520502
521503 summary. complete ( ) ;
522504
You can’t perform that action at this time.
0 commit comments