Closed damooo closed 1 year ago
There is an implicit requirement: StreamError
itself implements std::error::Error
, and relies on its inner error to do so.
Removing this would have an impact on other types...
For me, it seems natural that error types should implement std::error::Error
. The reason for anyhow::Error
to not implement this trait looks more like a technical constraint than a conceptual choice. And a workaround is proposed.
Currently
StreamError
's variantsSourceErr
,SinkErr
expects inner value to implementstd::error::Error
. Many errors may not implement that trait likeanyhow::Error
. There seems no requirement for that bound.