Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn reset_panic_info() {
});
}

pub fn take_panic(panic: &(dyn Any + Send + 'static)) -> PanicInfo {
pub fn take_panic(panic: &dyn Any) -> PanicInfo {
PANIC_INFO
.with(|pi| pi.borrow_mut().take())
.unwrap_or_else(move || serialize_panic(panic))
Expand Down Expand Up @@ -57,7 +57,7 @@ pub fn init_panic_hook(capture_backtraces: BacktraceCapture) {
}));
}

fn serialize_panic(panic: &(dyn Any + Send + 'static)) -> PanicInfo {
fn serialize_panic(panic: &dyn Any) -> PanicInfo {
PanicInfo::new(match panic.downcast_ref::<&'static str>() {
Some(s) => s,
None => match panic.downcast_ref::<String>() {
Expand Down