diff options
author | Aleksey Kladov <[email protected]> | 2020-06-27 18:55:54 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-06-27 19:50:16 +0100 |
commit | d21dae738b4440f699356865c71e4235f2911de6 (patch) | |
tree | bf4ba0cc6f847a6e9cebdc184b96f0ecb6382a1e /crates/expect/src/lib.rs | |
parent | be265ece02f8925457b328abeeba952645867fbd (diff) |
Update crates/expect/src/lib.rs
Co-authored-by: bjorn3 <[email protected]>
Diffstat (limited to 'crates/expect/src/lib.rs')
-rw-r--r-- | crates/expect/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
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 { | |||
106 | rt.help_printed = true; | 106 | rt.help_printed = true; |
107 | 107 | ||
108 | let help = if print_help { HELP } else { "" }; | 108 | let help = if print_help { HELP } else { "" }; |
109 | panic!( | 109 | println!( |
110 | "\n | 110 | "\n |
111 | error: expect test failed{} | 111 | error: expect test failed{} |
112 | --> {}:{}:{} | 112 | --> {}:{}:{} |
@@ -122,7 +122,9 @@ Actual: | |||
122 | ---- | 122 | ---- |
123 | ", | 123 | ", |
124 | updated, expect.file, expect.line, expect.column, help, expected, actual | 124 | updated, expect.file, expect.line, expect.column, help, expected, actual |
125 | ) | 125 | ); |
126 | // Use resume_unwind instead of panic!() to prevent a backtrace, which is unnecessary noise. | ||
127 | std::panic::resume_unwind(Box::new(())); | ||
126 | } | 128 | } |
127 | } | 129 | } |
128 | 130 | ||