|
A unit result has no value for the success case, but has an error for the failed case. How does that differ to using a plain |
Answered by
vkhorikov
Feb 26, 2022
Replies: 3 comments
|
|
0 replies
Answer selected by
lonix1
|
Was there a real need to introduce |
0 replies
|
I agree. I'm not sure if there was a 100% need for that, the topic itself is arguable. But in my projects, I just use |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Resultis a shortcut forResult<Unit, string>, whereasUnitResultis a shortcut forResult<Unit, T>. The difference is that inUnitResultthe error type may vary, whereas inResultit's set tostring. See also this discussion: #321