We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
&(dyn Any + Send)
&dyn Any
1 parent c48e9b1 commit e269f95Copy full SHA for e269f95
src/panic.rs
@@ -23,7 +23,7 @@ pub fn reset_panic_info() {
23
});
24
}
25
26
-pub fn take_panic(panic: &(dyn Any + Send + 'static)) -> PanicInfo {
+pub fn take_panic(panic: &dyn Any) -> PanicInfo {
27
PANIC_INFO
28
.with(|pi| pi.borrow_mut().take())
29
.unwrap_or_else(move || serialize_panic(panic))
@@ -57,7 +57,7 @@ pub fn init_panic_hook(capture_backtraces: BacktraceCapture) {
57
}));
58
59
60
-fn serialize_panic(panic: &(dyn Any + Send + 'static)) -> PanicInfo {
+fn serialize_panic(panic: &dyn Any) -> PanicInfo {
61
PanicInfo::new(match panic.downcast_ref::<&'static str>() {
62
Some(s) => s,
63
None => match panic.downcast_ref::<String>() {
0 commit comments