Closed KodrAus closed 2 years ago
+1 on this; &(dyn Error + 'static)
will also allow the use of Error::source
instead of the deprecated Error::cause
. Right now, the fact that error cause chains can only be traversed by calling a deprecated method is kind of a shame...
The current error variant in
Value::Error
is a plain&dyn Error
, which unfortunately doesn't support downcasting. It might be worth changing this to&(dyn Error + 'static)
, which seems to be a reasonably accepted restriction on the type to support any scenario a consumer might have.