You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for setting string values with the REG_EXPAND_SZ type when modifying the registry #3148
#3184 is now merged - can you please test the rustup port against github? I don't plan to publish another crate release until we're confident this is in good shape for the foreseeable future. Yue Fei (@InfyniteHeap)Rami (@rami3l)
I'd like to check some more things before the release, we're left with some unsafe code in rustup that might be nice to migrate into this crate.
The reason why I add unsafe code is that, since I cannot manually construct a Value to compare to what I got from get_value(), I have to manually seperately convert the got Value into Type and &[u8] to fit the requirements. See my latest commit and this issue.
That issue isn't clear on what it's asking for. By the way, #3190 provides a few small improvements for convertibility.
My initial idea is that, I probably need a pair of generic-feasible traits that can make Value and other types be inter-converted, as what did in the previous rustup code.
The original effect I wanted to reach out looks like this (for illustration purposes only, because this code definitely cannot be compiled):
My initial idea is that, I probably need a pair of generic-feasible traits that can make Value and other types be inter-converted, as what did in the previous rustup code.
TryFrom<Value> and TryInto<Value>are a pair of generic traits that can convert to/from Value.
Your code example will work, just with TryInto instead of TryFrom:
Sorry for the long delay, was on vacation but circling back to this now. Having some trouble cross-compiling the rustup code for Windows in the current state, so will see if I can figure this out.
Activity
kennykerr commentedon Jul 31, 2024
Here you go: #3184
kennykerr commentedon Aug 1, 2024
#3184 is now merged - can you please test the rustup port against github? I don't plan to publish another crate release until we're confident this is in good shape for the foreseeable future. Yue Fei (@InfyniteHeap) Rami (@rami3l)
rami3l commentedon Aug 5, 2024
Kenny Kerr (@kennykerr) rust-lang/rustup#3896 looks great with the Cargo patch that points to the latest dev version of the lib! Thanks to you and Yue Fei (@InfyniteHeap)'s efforts, the migration seems quite straightforward now.
djc commentedon Aug 5, 2024
I'd like to check some more things before the release, we're left with some unsafe code in rustup that might be nice to migrate into this crate.
kennykerr commentedon Aug 5, 2024
Rami (@rami3l) - glad to hear things are going well!
Dirkjan Ochtman (@djc) - sounds good - please open a new issue for any bug/feature requests.
InfyniteHeap commentedon Aug 5, 2024
The reason why I add unsafe code is that, since I cannot manually construct a
Valueto compare to what I got fromget_value(), I have to manually seperately convert the gotValueintoTypeand&[u8]to fit the requirements. See my latest commit and this issue.kennykerr commentedon Aug 5, 2024
That issue isn't clear on what it's asking for. By the way, #3190 provides a few small improvements for convertibility.
InfyniteHeap commentedon Aug 6, 2024
My initial idea is that, I probably need a pair of generic-feasible traits that can make
Valueand other types be inter-converted, as what did in the previous rustup code.The original effect I wanted to reach out looks like this (for illustration purposes only, because this code definitely cannot be compiled):
...But now I think it is no need indeed to require such this feature.
In any cases, this question is now resolved! xd
erikdesjardins commentedon Aug 7, 2024
TryFrom<Value>andTryInto<Value>are a pair of generic traits that can convert to/fromValue.Your code example will work, just with
TryIntoinstead ofTryFrom:or alternatively (less idiomatic):
rami3l commentedon Aug 30, 2024
Dirkjan Ochtman (@djc) Do you think so far it's safe for Kenny Kerr (@kennykerr) to cut a new release, given the current state of rust-lang/rustup#3896? Many thanks in advance!
djc commentedon Sep 3, 2024
Sorry for the long delay, was on vacation but circling back to this now. Having some trouble cross-compiling the rustup code for Windows in the current state, so will see if I can figure this out.