3 ms·
You can convert the Option to a Result where the None becomes the error and then propagate from that. This is basically how you are using this Option by the wa
by csomar 3y ago
You can convert the Option to a Result where the None becomes the error and then propagate from that.
This is basically how you are using this Option by the way, and while it's possible, you have to consider why the original author decided to return an Option and not a Result: It's because he wants you to handle that in a way that doesn't fail (ie: an error) but instead consider it as a non-failure possibility.