Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why couldnt you flatten it?




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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: