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

pub use HKEY #15

Closed
uranusjr opened this issue Dec 28, 2017 · 0 comments
Closed

pub use HKEY #15

uranusjr opened this issue Dec 28, 2017 · 0 comments

Comments

@uranusjr
Copy link

uranusjr commented Dec 28, 2017

Since all the HKEY_* enums are re-exported, would it be a good idea to re-export HKEY from winapi as well? My use case it that I’m defining a list of keys to look for, and since that is used in a lot of places I’m doing it globally like this:

const KEY_PATHS: &'static [(HKEY, &str); 3] = &[
    (HKEY_CURRENT_USER, "Software\\Foo"),
    (HKEY_LOCAL_MACHINE, "Software\\Foo"),
    (HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Foo"),
];

But that requires me to declare winapi as a dependency and extern crate. It works fine, but is not the most convenient. It would save a lot of hassle if winreg can just re-export HKEY.

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

No branches or pull requests

1 participant