@@ -464,31 +464,26 @@ impl WasmProcessor for WasmProcessorImpl {
464464 . first ( )
465465 . map ( |( _, b) | b. as_slice ( ) )
466466 . unwrap_or ( & [ ] ) ;
467- create_wasm_host (
468- first_bytes,
469- outputs,
470- init_context,
471- task_name,
472- create_time,
473- )
474- . map_err ( |e| -> Box < dyn Error + Send > {
475- let error_msg = format ! ( "Failed to create WasmHost: {}" , e) ;
476- log:: error!( "{}" , error_msg) ;
477- let mut full_error = error_msg. clone ( ) ;
478- let mut source = e. source ( ) ;
479- let mut depth = 0 ;
480- while let Some ( err) = source {
481- depth += 1 ;
482- full_error. push_str ( & format ! ( "\n Caused by ({}): {}" , depth, err) ) ;
483- source = err. source ( ) ;
484- if depth > 10 {
485- full_error. push_str ( "\n ... (error chain too long, truncated)" ) ;
486- break ;
467+ create_wasm_host ( first_bytes, outputs, init_context, task_name, create_time) . map_err (
468+ |e| -> Box < dyn Error + Send > {
469+ let error_msg = format ! ( "Failed to create WasmHost: {}" , e) ;
470+ log:: error!( "{}" , error_msg) ;
471+ let mut full_error = error_msg. clone ( ) ;
472+ let mut source = e. source ( ) ;
473+ let mut depth = 0 ;
474+ while let Some ( err) = source {
475+ depth += 1 ;
476+ full_error. push_str ( & format ! ( "\n Caused by ({}): {}" , depth, err) ) ;
477+ source = err. source ( ) ;
478+ if depth > 10 {
479+ full_error. push_str ( "\n ... (error chain too long, truncated)" ) ;
480+ break ;
481+ }
487482 }
488- }
489- log :: error! ( "Full error chain: \n {}" , full_error) ;
490- Box :: new ( WasmProcessorError :: InitError ( full_error ) )
491- } ) ?
483+ log :: error! ( "Full error chain: \n {}" , full_error ) ;
484+ Box :: new ( WasmProcessorError :: InitError ( full_error) )
485+ } ,
486+ ) ?
492487 } ;
493488
494489 * self . processor . borrow_mut ( ) = Some ( processor) ;
@@ -616,7 +611,10 @@ impl WasmProcessor for WasmProcessorImpl {
616611 Ok ( ( ) )
617612 }
618613
619- fn finish_checkpoint_outputs ( & mut self , checkpoint_id : u64 ) -> Result < ( ) , Box < dyn Error + Send > > {
614+ fn finish_checkpoint_outputs (
615+ & mut self ,
616+ checkpoint_id : u64 ,
617+ ) -> Result < ( ) , Box < dyn Error + Send > > {
620618 let mut store_ref = self . store . borrow_mut ( ) ;
621619 let store = store_ref. as_mut ( ) . ok_or_else ( || -> Box < dyn Error + Send > {
622620 Box :: new ( WasmProcessorError :: InitError (
0 commit comments