bytecodealliance / bytecodealliance/filecheck
Provide std::error::Error impl for filecheck::Error
- Dominant language
- Rust
- Stars
- 23
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
filecheck::Error does not implement std::error::Error, which makes it unergonomic to use with modern error libraries that rely on that impl for error types.
```rust
use anyhow::Result;
fn f() -> Result<(), filecheck::Error> {
Ok(())
}
fn main() -> Result<()> {
f()?; // doesn't work
Ok(())
}
```
```console
error[E0277]: the trait bound `filecheck::error::Error: std::error::Error` is not satisfied
--> src/main.rs:8:8
|
8 | f()?; // doesn't work
| ^ the trait `std::error::Error` is not implemented for `filecheck::error::Error`
|
= note: required because of the requirements on the impl of `std::convert::From` for `anyhow::Error`
= note: required by `std::convert::From::from
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.