1 2 3 4 5 6 7 8 9 10 11 12 13
mod helpers; use std::any::Any; use helpers::panic_message; use crate::TaskFailure; impl From<Box<dyn Any + Send + 'static>> for TaskFailure { fn from(payload: Box<dyn Any + Send + 'static>) -> Self { Self::Panic(panic_message(&*payload).into()) } }