-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Result<(), ??>
over ReturnCode
#3
Comments
This is actually a bit more and a bit less, since it no longe rlinks to #3#. I've made the decision to keep a small part of my repository closed source, so linking to it as a runnable example is probably not the best idea! If anyone else has fully open source examples, I'll be glad to add them.
Seems there are some coherence issues implementing In the mean time I'm going to add a utility method to go from |
With return code built as enums, this becomes obsolete. Instead of having a two element enum ( I'd move to close this. @daboross |
@ASalvail IIRC this has always been the case, there was never a time that The main advantages of
|
Making an issue here as a reminder.
It seems generally be more "rusty" to do this. The one disadvantage is having a two-byte return type size rather than one-byte, but that shouldn't be too large of a problem at all. We could even leave
ReturnCode
as a type alias forResult<(), ??>
.One question I'm not sure about is what to call the error portion. I'm thinking
ErrorCode
would work well, but justError
orGameError
might also be good. I'm partially againstScreeps*
names because of duplication withscreeps::
crate name.The text was updated successfully, but these errors were encountered: