-
-
Notifications
You must be signed in to change notification settings - Fork 336
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
Return std::result #1267
Comments
There is a const to check that. It would make the whole API more annoying otherwise, don't you think? |
I think it would make the api safer. Checking whether a string is empty to say the system is unsupported should be done in most cases and making it return an std::result would make users of the library think about that. |
This would just increase complexity of the API for an information that you can check with a constant. Doesn't sound like a good idea... |
While with a perfect programmer this would be correct, we live in a world with imperfect actors. Rust code and libraries should nudge users towards proper and safe code and I believe this change would do that. |
Coming back to this: would making initializer methods (ie, Also, I think an |
Instead of returning an empty value on unsupported systems an err could be returned.
The text was updated successfully, but these errors were encountered: