Update crates/expect/src/lib.rs

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
This commit is contained in:
Aleksey Kladov 2020-06-27 19:55:54 +02:00
parent be265ece02
commit d21dae738b

View file

@ -106,7 +106,7 @@ impl Runtime {
rt.help_printed = true; rt.help_printed = true;
let help = if print_help { HELP } else { "" }; let help = if print_help { HELP } else { "" };
panic!( println!(
"\n "\n
error: expect test failed{} error: expect test failed{}
--> {}:{}:{} --> {}:{}:{}
@ -122,7 +122,9 @@ Actual:
---- ----
", ",
updated, expect.file, expect.line, expect.column, help, expected, 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(()));
} }
} }