From 27b953e0e1a67e85195b1bcaa8295479841f5726 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Fri, 28 Apr 2023 09:41:13 +0200 Subject: [PATCH] Change `&(dyn Any + Send)` to `&dyn Any`. The `Send` trait is useless for references. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 09d7a95..e5b3c9a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -126,7 +126,7 @@ mod imp { use super::*; /// Attempt to produce a message from a borrowed `dyn Any`. Note that care must be taken /// when calling this to avoid a `Box` being coerced to a `dyn Any` itself. - pub(super) fn get_panic_message(payload: &(dyn Any + Send)) -> Option<&str> { + pub(super) fn get_panic_message(payload: &dyn Any) -> Option<&str> { // taken from: https://github.com/rust-lang/rust/blob/4b9f4b221b92193c7e95b1beb502c6eb32c3b613/library/std/src/panicking.rs#L194-L200 match payload.downcast_ref::<&'static str>() { Some(msg) => Some(*msg),