Hacker News new | ask | show | jobs
by skribanto 175 days ago
Why couldnt you flatten it?
1 comments

You have three different value cases (main value, main Err case for `?` to consume, and whatever early-return case). And the `?` operator fully taking up the Err result case means your main-result+early-return values strictly must both be wrapped in an Ok.