You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
failure depends on backtrace crate when std feature is enabled, but it prevents me from testing dependencies with minimal versions (by cargo +nightly update -Z minimal-versions && cargo test --all-features).
(See rust-lang-deprecated/failure#310 for detail.)
Additionally, std Error trait are being improved and it would be useful enough (see rust-lang/rust#53487).
So it would be better to use simpler error types, rather than error types with many features and extra APIs, to avoid providing unnecessary functionalities and keeping their compatibilities.
As experiment, I created and replaced some types locally, but it seems to end up in creating struct FooError { msg: String } or something like that, and I don't feel it is better than anyhow::Error, so I abandoned that branch.
Additionally, current API is not stable, so creating dedicated error type would reduce flexibility of API.
In conclusion, I don't think I should remove anyhow or should stop using anyhow::Error, at least for now.
failure
depends onbacktrace
crate whenstd
feature is enabled, but it prevents me from testing dependencies with minimal versions (bycargo +nightly update -Z minimal-versions && cargo test --all-features
).(See rust-lang-deprecated/failure#310 for detail.)
Additionally, std
Error
trait are being improved and it would be useful enough (see rust-lang/rust#53487).So it would be better to use simpler error types, rather than error types with many features and extra APIs, to avoid providing unnecessary functionalities and keeping their compatibilities.
I'll use
anyhow
orthiserror
, but it is not yet decided.The text was updated successfully, but these errors were encountered: