3
jestdotty
65d

so anyhow is a rust crate used in like 1/3 of all repositories

but you could just not add a dependency and do Result<(), Box<dyn std::error::Error>>

🤔

probably I'm missing something

Comments
  • 0
    Yeahh fair haha.. Seems like there is a lot of handy stuff besides that in this package as well. Wouldn't necessarily use it for that but apparently a lot of people will
  • 0
    dyn Error isn't a concrete type, as in you still need an actual struct which implements Error which you can then return

    anyhow::Error is such a struct and it does some non trivial things like recording a lazy stack trace. For simple application-side error handling anyhow is honestly pretty great
Add Comment