diff --git a/src/panicking.rs b/src/panicking.rs index 9c83bfe..805a210 100644 --- a/src/panicking.rs +++ b/src/panicking.rs @@ -39,7 +39,7 @@ pub fn catch_unwind R>(f: F) -> Result, data_ptr, do_catch::) == 0 { + return if core::intrinsics::catch_unwind(do_call::, data_ptr, do_catch::) == 0 { Ok(ManuallyDrop::into_inner(data.r)) } else { Err(ManuallyDrop::into_inner(data.p))