Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add http::Error::inner_ref and cause (#303)
* add Error::inner_ref() for access to inner error type Also use `Error::inner_ref` to implement `std::error::Error::cause` for now. When MSRV is raised to 1.30.0+, this could also be used for `Error::source` without a breaking change. * add Error::is helper * rename Error::inner_ref to get_ref * make Error::cause be the inner error's cause None of the inner errors currently have a cause, but this is considered (see PR discussion) the most correct implementation of `std::error::Error::cause` and is thus future proofed.
- Loading branch information
1 parent
ffe719c
commit 5073ffd
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters