From ab12ccf3ff975eaae334d2786d43489447749110 Mon Sep 17 00:00:00 2001 From: glendc Date: Fri, 8 Nov 2024 19:44:19 +0100 Subject: [PATCH] static str now returns itself as src feels like a hack... but ok... chaining is bad in rust it seems --- rama-utils/src/macros/error.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rama-utils/src/macros/error.rs b/rama-utils/src/macros/error.rs index 3833fb34..e453ba76 100644 --- a/rama-utils/src/macros/error.rs +++ b/rama-utils/src/macros/error.rs @@ -25,7 +25,11 @@ macro_rules! __static_str_error { } } - impl std::error::Error for $name {} + impl std::error::Error for $name { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + Some(self) + } + } } } #[doc(inline)]