diff options
-rw-r--r-- | components/util/thread.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/util/thread.rs b/components/util/thread.rs index b8fba1aa773..aa0baac20aa 100644 --- a/components/util/thread.rs +++ b/components/util/thread.rs @@ -57,7 +57,7 @@ pub fn spawn_named<F>(name: String, f: F) pub trait AddFailureDetails { fn add_panic_message(&mut self, message: String); - fn add_panic_object(&mut self, object: Box<Any>) { + fn add_panic_object(&mut self, object: &Any) { if let Some(message) = object.downcast_ref::<String>() { self.add_panic_message(message.to_owned()); } else if let Some(&message) = object.downcast_ref::<&'static str>() { @@ -111,7 +111,7 @@ pub fn spawn_named_with_send_on_failure<F, T, S>(name: String, Ok(()) => (), Err(err) => { debug!("{} failed, notifying constellation", name); - msg.add_panic_object(err); + msg.add_panic_object(&*err); dest.send_on_failure(S::Value::from(msg)); } } |