Closed zardini123 closed 4 months ago
After attempting to include changes in a personal project, I found DeviceInfo::enumerate
hangs indefinitely. From further analysis, the upgraded windows-rs
crate these changes require (due to HSTRING hash contribution) result in some changes somewhere with the FindAllAsyncAqsFilter
that hangs indefinitely. Going back to async-hid
's original dependency version of windows-rs
solves the problem.
Instead of spending the time to solve the reason of this indefinite hanging issue with windows-rs
, I will instead implement a HashableHSTRING
wrapper type as suggested by @sidit77 in https://github.com/sidit77/async-hid/issues/3#issuecomment-1985202469.
Manually tested, and found Hash implementation works. Changes are now ready for review.
Let me know if there is any changes that need to be done for this to be merged. Thanks!
I'm a bit busy right now without access to my PC but I'll try to review it as soon as I'm able.
No problem, thanks @sidit77!
Thanks for your contribution
Implements Hash for DeviceId.
As mentioned in #3, all underlying platform-specific types used by DeviceId already implement Hash except windows-rs HSTRING. This PR utilizes the recent addition of HSTRING Hash impl to windows-rs (the windows-rs commit). Due to utilizing a more recent windows-rs version with API changes, additional changes were made to async-hid to satisfy those changes.
As of writing, the commit has been merged into windows-rs master (the PR, but a new release has not been released yet (will be version 0.56.0). Will update this PR when windows-rs releases a change.
Resolves #3