5 ms·
Why couldnt you flatten it?
by skribanto 9mo ago
Why couldnt you flatten it?
- dzaima 9mo agoYou 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.