From d21dae738b4440f699356865c71e4235f2911de6 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 27 Jun 2020 19:55:54 +0200 Subject: [PATCH] Update crates/expect/src/lib.rs Co-authored-by: bjorn3 --- crates/expect/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/expect/src/lib.rs b/crates/expect/src/lib.rs index 08d0eafdf9..1a1302cec7 100644 --- a/crates/expect/src/lib.rs +++ b/crates/expect/src/lib.rs @@ -106,7 +106,7 @@ impl Runtime { rt.help_printed = true; let help = if print_help { HELP } else { "" }; - panic!( + println!( "\n error: expect test failed{} --> {}:{}:{} @@ -122,7 +122,9 @@ Actual: ---- ", updated, expect.file, expect.line, expect.column, help, expected, actual - ) + ); + // Use resume_unwind instead of panic!() to prevent a backtrace, which is unnecessary noise. + std::panic::resume_unwind(Box::new(())); } }