2 ms·
Yes! But... 1) If I type that line myself, I want to know what `Box<dyn Error>` means. 2) For an audience of mixed levels of Rust expertise, the `Box<dyn Err
by rectang 6y ago
Yes! But...
1) If I type that line myself, I want to know what `Box<dyn Error>` means.
2) For an audience of mixed levels of Rust expertise, the `Box<dyn Error>` idiom is on average clearer, because the more experienced Rustaceans will have seen it before while `Outcome` will be unfamiliar and in need of explanation.
I thought about publishing a crate with just that one line, but there's already a slew of other similar solutions out there (anyhow, any-error, etc...). There's not that much to gain.
I just think it's worth pointing out that it's weird to require newbies to understand `Box` and `dyn` in order to handle errors.