http_types::Error should implement std::error::Error
Open
- Dominant language
- Rust
- Stars
- 209
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
Because it doesn't, this does not compile:
```rust
async fn get(addr: &str) -> anyhow::Result {
// ...
let resp = async_h1::connect(stream, req).await?;
Ok(resp)
}
```
It's not obvious what to do, so I'm using a hack like this:
```rust
let resp = async_h1::connect(stream, req).await.map_err(anyhow::Error::msg)?;
```
In any case, all error types should implement `std::error::Error` in order to work seamlessly with the `?` operator.
Contributor guide
Assessment
This issue has not been assessed yet.