Unpack Nested Results
Result::flatten currently is unstable and requires the nightly version of Rust to run.
Nested Results can quickly become an issue in Rust. Rust has neither Exceptions nor Errors. Instead, Rust has its enum Result, which is basically an Either type that either contains a success case or an error case. But due to this, sometimes, you have to deal with nested Results. In this case, your code can quickly become pretty bloated.
You can go from this:
Or from this: