this post was submitted on 07 Aug 2025
58 points (100.0% liked)

Rust

7228 readers
47 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 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Ephera@lemmy.ml 3 points 1 day ago

Yeah, I can see your point. It's certainly not something you should overuse, just because it's convenient.

I feel like the redeeming points are that it will only be available, if it's the same error type. And if you use a catch-all error type, like anyhow::Error, which makes it likely for nested results to use the same error type, then it's likely that you can use ?? already.
So, personally, I feel like it isn't something that juniors will readily/wrongfully incorporate into their error handling routine and rather it is a tool that's available for when you know what you're doing.