logoalt Hacker News

dzaimayesterday at 10:10 AM1 replyview on HN

For the case where `try` is useful over the functional form (i.e. parent's situation of having a desired Result, plus some unrelated early-returning), that ends up with nested `Result`s though, i.e. spamming an `Ok(Ok(x))` on all the non-erroring cases, which gets ugly fast.


Replies

skribantoyesterday at 2:32 PM

Why couldnt you flatten it?