mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-20 10:50:40 +00:00
In the `TryFrom<HandleOrInvalid> for OwnedHandle` and `TryFrom<HandleOrNull> for OwnedHandle` implemenations, `forget` the owned handle on the error path, to avoid calling `CloseHandle` on an invalid handle. It's harmless, except that it may overwrite the thread's `GetLastError` error.