Closed x-hgg-x closed 2 years ago
I think the
Error::source()
implementation ofstrftime::Error
is not necessary, since we can already match the error and extract the inner value in all cases.
The Error::source
implementation is not for when you have a strftime::Error
, but when you have a Box<dyn Error>
that happens to be a strftime::Error
.
I think we should also add the Error::IoError
case to the existing source impl.
To provide some more context, a crate like eyre
collects dyn Error
s into a report type and reports the chain of error causes: https://docs.rs/eyre/latest/eyre/. This is only possible if we implement the Error::source
method.
There is one more missed line since I removed derive implementations for strftime::Error
.
The Code Coverage
check is not required, so this should not block the merge.
I think the
Error::source()
implementation ofstrftime::Error
is not necessary, since we can already match the error and extract the inner value in all cases.