@@ -95,7 +95,13 @@ pub fn upload_index_with_options(
9595
9696 // 5. Upload manifest shards per section
9797 info ! ( "uploading manifest shards" ) ;
98- upload_manifest_shards ( & client, & endpoints, api_key, artifacts, needed_hashes. as_ref ( ) ) ?;
98+ upload_manifest_shards (
99+ & client,
100+ & endpoints,
101+ api_key,
102+ artifacts,
103+ needed_hashes. as_ref ( ) ,
104+ ) ?;
99105
100106 Ok ( ( ) )
101107}
@@ -166,7 +172,12 @@ fn upload_content_blobs(
166172 }
167173
168174 processed = processed. saturating_add ( batch. len ( ) ) ;
169- maybe_log_progress ( "content blobs" , processed, artifacts. content_blob_count ( ) , & mut last_percent) ;
175+ maybe_log_progress (
176+ "content blobs" ,
177+ processed,
178+ artifacts. content_blob_count ( ) ,
179+ & mut last_percent,
180+ ) ;
170181
171182 tx. send ( batch)
172183 . map_err ( |_| anyhow ! ( "content blob upload worker dropped" ) ) ?;
@@ -226,7 +237,10 @@ fn request_needed_content_hashes(
226237 . json ( )
227238 . context ( "failed to deserialize content need response" ) ?;
228239
229- info ! ( needed = response. missing. len( ) , "found content hashes to upload" ) ;
240+ info ! (
241+ needed = response. missing. len( ) ,
242+ "found content hashes to upload"
243+ ) ;
230244 Ok ( response. missing . into_iter ( ) . collect ( ) )
231245}
232246
@@ -292,7 +306,12 @@ fn upload_unique_chunks(
292306 }
293307
294308 processed = processed. saturating_add ( chunks. len ( ) ) ;
295- maybe_log_progress ( "unique chunks" , processed, needed_chunks. len ( ) , & mut last_percent) ;
309+ maybe_log_progress (
310+ "unique chunks" ,
311+ processed,
312+ needed_chunks. len ( ) ,
313+ & mut last_percent,
314+ ) ;
296315
297316 tx. send ( chunks)
298317 . map_err ( |_| anyhow ! ( "unique chunk upload worker dropped" ) ) ?;
@@ -343,7 +362,12 @@ fn upload_chunk_mappings(
343362 }
344363
345364 processed = processed. saturating_add ( batch. len ( ) ) ;
346- maybe_log_progress ( "chunk mappings" , processed, artifacts. chunk_mapping_count ( ) , & mut last_percent) ;
365+ maybe_log_progress (
366+ "chunk mappings" ,
367+ processed,
368+ artifacts. chunk_mapping_count ( ) ,
369+ & mut last_percent,
370+ ) ;
347371
348372 tx. send ( batch)
349373 . map_err ( |_| anyhow ! ( "chunk mapping upload worker dropped" ) ) ?;
@@ -419,8 +443,8 @@ fn upload_manifest_shards(
419443 "reference_record" ,
420444 Some ( artifacts. reference_record_count ( ) ) ,
421445 |line| {
422- let record: ReferenceRecord = serde_json :: from_str ( line )
423- . context ( "failed to parse reference record" ) ?;
446+ let record: ReferenceRecord =
447+ serde_json :: from_str ( line ) . context ( "failed to parse reference record" ) ?;
424448 Ok ( needed. contains ( & record. content_hash ) )
425449 } ,
426450 ) ?;
@@ -728,7 +752,8 @@ fn maybe_log_progress(label: &str, processed: usize, total: usize, last_percent:
728752 if percent > 100 {
729753 percent = 100 ;
730754 }
731- let should_log = percent >= last_percent. saturating_add ( PROGRESS_STEP_PERCENT ) || percent == 100 ;
755+ let should_log =
756+ percent >= last_percent. saturating_add ( PROGRESS_STEP_PERCENT ) || percent == 100 ;
732757
733758 if should_log {
734759 * last_percent = percent;
0 commit comments