From d21dae738b4440f699356865c71e4235f2911de6 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 27 Jun 2020 19:55:54 +0200 Subject: Update crates/expect/src/lib.rs Co-authored-by: bjorn3 --- crates/expect/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/expect/src/lib.rs') diff --git a/crates/expect/src/lib.rs b/crates/expect/src/lib.rs index 08d0eafdf..1a1302cec 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(())); } } -- cgit v1.2.3