diff options
author | HampusM <hampus@hampusmat.com> | 2023-03-21 22:29:42 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-03-21 22:29:42 +0100 |
commit | 96a13690f8552386bb183ebc01418774047ebbfc (patch) | |
tree | 6796c13c3ce5a9632617778539abee3b0d247f88 /macros/src/expectation.rs | |
parent | 9ae69bc7024865324e21d3480954e010119ff6e2 (diff) |
fix: prevent panicking while panicking in expectation drop
Diffstat (limited to 'macros/src/expectation.rs')
-rw-r--r-- | macros/src/expectation.rs | 2 |
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 ", |