@@ -268,7 +268,7 @@ impl RecoverableError {
268268 /// Create a new recoverable error
269269 pub fn new ( error : Error , context : ErrorContext ) -> Self {
270270 let manager = ErrorRecoveryManager :: new ( ) ;
271- let recovery_suggestion = manager. recover ( & error, & context;
271+ let recovery_suggestion = manager. recover ( & error, & context) ;
272272
273273 Self {
274274 error,
@@ -299,28 +299,28 @@ impl DebugUtils {
299299 output. push_str ( & format ! (
300300 "Error: {} (Code: {})\n " ,
301301 error. message, error. code
302- ;
303- output. push_str( & format!( "Category: {:?}\n " , error. category;
304- output. push_str( & format!( "Location: {}\n " , context. location;
302+ ) ) ;
303+ output. push_str ( & format ! ( "Category: {:?}\n " , error. category) ) ;
304+ output. push_str ( & format ! ( "Location: {}\n " , context. location) ) ;
305305
306306 if !context. context . is_empty ( ) {
307- output. push_str( "Context:\n " ;
307+ output. push_str ( "Context:\n " ) ;
308308 for ( key, value) in & context. context {
309- output. push_str( & format!( " {}: {}\n " , key, value;
309+ output. push_str ( & format ! ( " {}: {}\n " , key, value) ) ;
310310 }
311311 }
312312
313313 if !context. stack_trace . is_empty ( ) {
314- output. push_str( "Stack trace:\n " ;
314+ output. push_str ( "Stack trace:\n " ) ;
315315 for ( i, frame) in context. stack_trace . iter ( ) . enumerate ( ) {
316- output. push_str( & format!( " {}: {}\n " , i, frame;
316+ output. push_str ( & format ! ( " {}: {}\n " , i, frame) ) ;
317317 }
318318 }
319319
320320 output. push_str ( & format ! (
321321 "Recovery strategy: {:?}\n " ,
322322 context. recovery_strategy
323- ;
323+ ) ) ;
324324
325325 output
326326 }
@@ -344,10 +344,10 @@ impl DebugUtils {
344344 operation, instruction_offset
345345 ) )
346346 . with_context ( "operation" , operation)
347- . with_context( "offset" , format!( "{}" , instruction_offset;
347+ . with_context ( "offset" , format ! ( "{}" , instruction_offset) ) ;
348348
349349 if let Some ( func_idx) = function_index {
350- ctx = ctx. with_context( "function_index" , format!( "{}" , func_idx;
350+ ctx = ctx. with_context ( "function_index" , format ! ( "{}" , func_idx) ) ;
351351 }
352352
353353 ctx
@@ -366,9 +366,9 @@ macro_rules! error_context {
366366 {
367367 let mut ctx = $crate:: recovery:: ErrorContext :: new( format!( "{}:{} in {}" , file!( ) , line!( ) , $location) )
368368 . with_context( "file" , file!( ) )
369- . with_context( "line" , format!( "{}" , line!( ) ;
369+ . with_context( "line" , format!( "{}" , line!( ) ) ) ;
370370 $(
371- ctx = ctx. with_context( $key, $value;
371+ ctx = ctx. with_context( $key, $value) ;
372372 ) +
373373 ctx
374374 }
@@ -382,14 +382,14 @@ macro_rules! recoverable {
382382 match $expr {
383383 Ok ( value) => Ok ( value) ,
384384 Err ( error) => {
385- let recoverable = $crate :: recovery:: RecoverableError :: new( error, $context;
385+ let recoverable = $crate:: recovery:: RecoverableError :: new( error, $context) ;
386386 match recoverable. recovery_suggestion {
387387 $crate:: recovery:: RecoveryResult :: Continue
388388 | $crate:: recovery:: RecoveryResult :: Skip => {
389389 // Log and continue
390390 #[ cfg( feature = "std" ) ]
391- eprintln!( "Recovered from error: {}" , recoverable. error. message; ) )
392- return recoverable. into_result) ;
391+ eprintln!( "Recovered from error: {}" , recoverable. error. message) ;
392+ return recoverable. into_result( ) ;
393393 } ,
394394 _ => Err ( recoverable. error) ,
395395 }
0 commit comments