Skip to content

Commit d21dae7

Browse files
matkladbjorn3
andcommitted
Update crates/expect/src/lib.rs
Co-authored-by: bjorn3 <[email protected]>
1 parent be265ec commit d21dae7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/expect/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl Runtime {
106106
rt.help_printed = true;
107107

108108
let help = if print_help { HELP } else { "" };
109-
panic!(
109+
println!(
110110
"\n
111111
error: expect test failed{}
112112
--> {}:{}:{}
@@ -122,7 +122,9 @@ Actual:
122122
----
123123
",
124124
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(()));
126128
}
127129
}
128130

0 commit comments

Comments
 (0)