summaryrefslogtreecommitdiff
path: root/macros/src/expectation.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-03-21 22:29:42 +0100
committerHampusM <hampus@hampusmat.com>2023-03-21 22:29:42 +0100
commit96a13690f8552386bb183ebc01418774047ebbfc (patch)
tree6796c13c3ce5a9632617778539abee3b0d247f88 /macros/src/expectation.rs
parent9ae69bc7024865324e21d3480954e010119ff6e2 (diff)
fix: prevent panicking while panicking in expectation drop
Diffstat (limited to 'macros/src/expectation.rs')
-rw-r--r--macros/src/expectation.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/macros/src/expectation.rs b/macros/src/expectation.rs
index 4095278..af604ae 100644
--- a/macros/src/expectation.rs
+++ b/macros/src/expectation.rs
@@ -427,7 +427,7 @@ impl ToTokens for Expectation
if let ::ridicule::__private::CallCountExpectation::Times(
times
) = self.call_cnt_expectation {
- if call_cnt != times {
+ if !::std::thread::panicking() && call_cnt != times {
panic!(
concat!(
"Expected function {} to be called {} times. Was ",