Skip to content
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

HResult::extract_code() is easily confused with HResult::code() #6

Open
agashlin opened this issue Apr 19, 2019 · 0 comments
Open

HResult::extract_code() is easily confused with HResult::code() #6

agashlin opened this issue Apr 19, 2019 · 0 comments

Comments

@agashlin
Copy link
Owner

The documentation should warn that this is probably not what you want, code() being the thing that actually gets the HRESULT, while extract_code returns the same type but masked out.

Unfortunately the generated docs for HResult don't show the methods from the generic ErrorAndSource, there is a link in the summary but it's easy to overlook. I wonder if there is a way to get those included... (looks like this is rust-lang/rust#32077)

Maybe it shouldn't return HRESULT at all, but instead the underlying i32 (same with extract_facility).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant