File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use std::{
44 fmt:: Debug ,
55 num:: ParseIntError ,
66 str:: FromStr ,
7- sync:: { Arc , Mutex } ,
7+ sync:: Arc ,
88} ;
99
1010use bytes:: Bytes ;
@@ -242,7 +242,7 @@ pub(crate) fn check_repository<P: ProgressBars, S: Open>(
242242 opts : CheckOptions ,
243243 trees : Vec < TreeId > ,
244244) -> RusticResult < Summary > {
245- let summary = Arc :: new ( Mutex :: new ( Summary :: new ( "check" ) ) ) ;
245+ let summary = Summary :: new ( "check" ) . into_arc_mutex ( ) ;
246246 let be = repo. dbe ( ) ;
247247 let cache = repo. cache ( ) ;
248248 let hot_be = & repo. be_hot ;
@@ -459,7 +459,7 @@ fn check_cache_files(
459459 file_type : FileType ,
460460 p : & impl Progress ,
461461) -> RusticResult < Option < Summary > > {
462- let summary = Arc :: new ( Mutex :: new ( Summary :: new ( "cache files" ) . enable_log ( ) ) ) ;
462+ let summary = Summary :: new ( "cache files" ) . enable_log ( ) . into_arc_mutex ( ) ;
463463 let files = cache. list_with_size ( file_type) ?;
464464
465465 if files. is_empty ( ) {
@@ -744,7 +744,7 @@ fn check_trees(
744744 snap_trees : Vec < TreeId > ,
745745 pb : & impl ProgressBars ,
746746) -> RusticResult < ( BTreeSet < PackId > , Summary ) > {
747- let mut summary = Box :: new ( Summary :: new ( "trees" ) . enable_log ( ) ) ;
747+ let mut summary = Summary :: new ( "trees" ) . enable_log ( ) . into_boxed ( ) ;
748748 let mut packs = BTreeSet :: new ( ) ;
749749 let p = pb. progress_counter ( "checking trees..." ) ;
750750 let mut tree_streamer = TreeStreamerOnce :: new ( be, index, snap_trees, p) ?;
You can’t perform that action at this time.
0 commit comments