-
Notifications
You must be signed in to change notification settings - Fork 56
Fix registry resource to allow setting value with no data
#684
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR addresses an issue with setting a registry value without data by introducing a new "None" variant, while also fixing issues in the build script and adjusting some i18n messages.
- Allow setting registry values with no data by mapping Data::None to RegistryValueData::None.
- Update translation parameter syntax and improve localization strings.
- Tidy up key path handling and remove a redundant code block.
Reviewed Changes
| File | Description |
|---|---|
| registry/src/registry_helper.rs | Adjusts conversion and handling of "None" registry data, improves translation parameter syntax, and refines key path parsing. |
| registry/src/config.rs | Adds a new “None” variant to the RegistryValueData enum. |
| registry/locales/en-us.toml | Updates i18n messages for better clarity and consistency. |
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
registry/src/registry_helper.rs:106
- Ensure that the updated parameter syntax 'subkey = subkey' is consistent with localization formatting conventions and that it properly substitutes the placeholder as intended.
what_if_metadata.push(t!("registry_helper.whatIfCreateKey", subkey = subkey).to_string());
registry/src/registry_helper.rs:122
- Ensure that borrowing a reference to 'RegistryValueData::None' does not lead to lifetime issues. If 'RegistryValueData' is not Copy, consider using a static instance or refactoring to avoid referencing a temporary.
let value_data = match &self.config.value_data { Some(value_data) => value_data, None => &RegistryValueData::None, };
36993d8 to
e9397db
Compare
PR Summary
valueDatamember that is returned won't be present when RZ_NONE is used.PR Context
Fix #683