Closed Philosobyte closed 1 year ago
Hmm, it appears @gentoo90 is working on a branch to switch to windows-sys as we speak. I will close this PR and eagerly await for gentoo90's work.
Rebased onto the latest master
and published as part of version 0.50.0
Rebased onto the latest
master
and published as part of version0.50.0
Thank you!
windows-sys
is officially supported by Microsoft and contains many more APIs thanwinapi-rs
does. Switching towindows-sys
makes future work easier. I started from @sn99's PR #48 and discovered the reason for the test failure. HKEY is defined inwindows-sys
as an isize. It is possible forHKEY_CLASSES_ROOT
to overflow this isize and break comparisons in theRegKey::close_(&mut self)
method, thus resulting in RegKeys not being dropped when they go out of scope. The easiest fix I could think of is to cast HKEYs to a usize during the comparison.With all due respect to @sn99, I've removed most of the stylistic changes so the PR is more focused and easier for @gentoo90 to review.
I'm pretty new to both Windows development and Rust, so I would take any feedback vigorously.