@@ -104,9 +104,7 @@ impl ParallelTransportPool {
104104 HttpTransportClient :: connect ( & host, port, use_tls)
105105 . await
106106 . map_err ( |e| {
107- ImportError :: HttpTransportError ( format ! (
108- "Failed to connect to Exasol: {e}"
109- ) )
107+ ImportError :: HttpTransportError ( format ! ( "Failed to connect to Exasol: {e}" ) )
110108 } )
111109 } ) ;
112110 connect_handles. push ( handle) ;
@@ -126,10 +124,7 @@ impl ParallelTransportPool {
126124 ) )
127125 } ) ?
128126 . map_err ( |e| {
129- ImportError :: ParallelImportError ( format ! (
130- "Connection {} failed: {e}" ,
131- idx
132- ) )
127+ ImportError :: ParallelImportError ( format ! ( "Connection {} failed: {e}" , idx) )
133128 } ) ?;
134129
135130 // Generate file entry with unique file name
@@ -228,15 +223,9 @@ pub async fn stream_files_parallel(
228223
229224 // Stream data in chunks
230225 for chunk in data. chunks ( CHUNK_SIZE ) {
231- client
232- . write_chunked_body ( chunk)
233- . await
234- . map_err ( |e| {
235- ImportError :: ParallelImportError ( format ! (
236- "File {} streaming failed: {e}" ,
237- idx
238- ) )
239- } ) ?;
226+ client. write_chunked_body ( chunk) . await . map_err ( |e| {
227+ ImportError :: ParallelImportError ( format ! ( "File {} streaming failed: {e}" , idx) )
228+ } ) ?;
240229 }
241230
242231 // Send final chunk
@@ -260,9 +249,7 @@ pub async fn stream_files_parallel(
260249 . map_err ( |e| {
261250 ImportError :: ParallelImportError ( format ! ( "Stream task {} panicked: {e}" , idx) )
262251 } ) ?
263- . map_err ( |e| {
264- ImportError :: ParallelImportError ( format ! ( "Stream {} failed: {e}" , idx) )
265- } ) ?;
252+ . map_err ( |e| ImportError :: ParallelImportError ( format ! ( "Stream {} failed: {e}" , idx) ) ) ?;
266253 }
267254
268255 Ok ( ( ) )
@@ -378,10 +365,7 @@ pub async fn convert_parquet_files_to_csv(
378365 let csv_data = handle
379366 . await
380367 . map_err ( |e| {
381- ImportError :: ParallelImportError ( format ! (
382- "Conversion task {} panicked: {e}" ,
383- idx
384- ) )
368+ ImportError :: ParallelImportError ( format ! ( "Conversion task {} panicked: {e}" , idx) )
385369 } ) ?
386370 . map_err ( |e| {
387371 ImportError :: ParallelImportError ( format ! ( "Conversion {} failed: {e}" , idx) )
@@ -411,11 +395,7 @@ mod tests {
411395
412396 #[ test]
413397 fn test_import_file_entry_no_tls ( ) {
414- let entry = ImportFileEntry :: new (
415- "10.0.0.5:8563" . to_string ( ) ,
416- "002.csv" . to_string ( ) ,
417- None ,
418- ) ;
398+ let entry = ImportFileEntry :: new ( "10.0.0.5:8563" . to_string ( ) , "002.csv" . to_string ( ) , None ) ;
419399
420400 assert_eq ! ( entry. address, "10.0.0.5:8563" ) ;
421401 assert_eq ! ( entry. file_name, "002.csv" ) ;
0 commit comments