windows-rs
windows-rs copied to clipboard
ID3D11DeviceContext::RSGetState returns a Result<>, should be an Option<>
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
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.