But will cause a separate and unhelpful error if called on an Error that does not manually implement description(). The alternative is using to_string().
Edit:
Additionally Error::cause() has been deprecated in favor of Error::source(). I just noticed.
The function
Error::description()
is soft-deprecated: https://doc.rust-lang.org/std/error/trait.Error.htmlIt is only used in one place in
try_or_400!
https://github.com/tomaka/rouille/blob/421f45dc38e755f80076f9b63afdff9580e0de16/src/try_or_400.rs#L59But will cause a separate and unhelpful error if called on an
Error
that does not manually implementdescription()
. The alternative is usingto_string()
.Edit: Additionally
Error::cause()
has been deprecated in favor ofError::source()
. I just noticed.