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

ID3D11DeviceContext::RSGetState returns a Result<>, should be an Option<> #2856

Open
rokbok opened this issue Feb 19, 2024 · 1 comment
Open
Labels
question Further information is requested

Comments

@rokbok
Copy link

rokbok commented Feb 19, 2024

Summary

ID3D11DeviceContext::RSGetState returns a Result<>. However, according to the docs, this function cannot fail. So I assume an error is returned when the C++ function returns null. This is a bit misleading, because nothing went wrong. The function should return None instead in this case

Crate manifest

No response

Crate code

No response

@rokbok rokbok added the bug Something isn't working label Feb 19, 2024
@kennykerr kennykerr added enhancement New feature or request and removed bug Something isn't working labels Feb 19, 2024
@kennykerr kennykerr added question Further information is requested and removed enhancement New feature or request labels Aug 29, 2024
@kennykerr
Copy link
Collaborator

I've been torn about whether this should be fixed or whether this is more consistent the way it is. Since many/most APIs return a COM interface using Result<T>, it would make this API different without a compelling reason to be different.

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

No branches or pull requests

2 participants