this post was submitted on 11 Jun 2026
26 points (100.0% liked)

Rust

8057 readers
68 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] Gobbel2000@programming.dev 3 points 21 hours ago (1 children)

There is the map_err method on Result which simplifies this case. But yes, anyhow is still easier if you don't care that much about the error contents.

[โ€“] treadful@lemmy.zip 1 points 12 hours ago

Completely forgot about this one. Think I still like the other approach (implementing From) for most places, but I'll keep this one in mind too, thanks.