3 ms·
I've run into similar issues and found that the `thiserror` crate (https://crates.io/crates/thiserror https://crates.io/crates/thiserror) combined w/ anyhow mak
by a5huynh 4y ago
I've run into similar issues and found that the `thiserror` crate (https://crates.io/crates/thiserror https://crates.io/crates/thiserror) combined w/ anyhow makes a lot of that pain go away
- steveklabnik 4y agoFor those reading this that aren't super familiar, common Rust advice is "use thiserror for libraries and anyhow for applications," as they make slightly different tradeoffs and so are useful, especially together.
- chrisgacsal 4y agoI would add `snafu`(https://crates.io/crates/snafu https://crates.io/crates/snafu) here as a good alternative to thiserror+anyhow.
- echelon 4y ago`anyhow` + `?` make writing an application as smooth as butter. You won't miss exceptions. Don't use `anyhow` for libraries, though. You want to provide your consumers the ability to `match`.
- anacrolix 4y agohere we go again!