-
Notifications
You must be signed in to change notification settings - Fork 534
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
Avoid Result
transformation for WIN32_ERROR
#2890
Conversation
Is it worth marking Cheers |
Good idea! |
Forgive me for a further question, but I notice various functions do still return Was this applied selectively to certain functions or should it be consistent throughout? Thanks again mate, and keep up the great work! |
The transformation is (still) applied to functions that return |
Ah gotcha, that makes sense, thanks for the clarification 😄 |
Fix breaking changes caused by microsoft/windows-rs#2890
Much like
NTSTATUS
andRPC_STATUS
, functions that returnWIN32_ERROR
often require the caller to inspect and branch based on the specific error code. Automatically transforming to aResult
can make this needlessly complicated as the error code needs to be re-translated back from anHRESULT
.Callers that still want a Result or
?
error propagation can simply use theok
helper as inSomeApi().ok()?
.