This is an unfriendly choice for errors returned by a library because it makes them not work with ?.
async fn repro() -> Result<(), failure::Error> {
let _ = surf::get("https://www.rust-lang.org").await?; // doesn't work
Ok(())
}
async fn repro() -> anyhow::Result<()> {
let _ = surf::get("https://www.rust-lang.org").await?; // doesn't work
Ok(())
}
Application-focused error types like failure::Error are built on impl<T: std::error::Error> From<T> which is why it matters that library errors implement std::error::Error.