Closed kennykerr closed 1 week ago
Wow, that's quite the bizarre nightly behavior. 🤪
Looks like that's a rustfmt bug:
https://github.com/rust-lang/rustfmt/issues/6210 https://github.com/rust-lang/rust/pull/126888
Oh it just occurred to me that maybe we could just return a HSTRING
or a Vec<u16>
and let users turn that into a OsString
or whatever they want. It's less ergonomic for the OsString
case but more flexible in general.
Yes, I thought about using HSTRING
instead. It's way better and provides convertibility with OsString
. I just need to pull HSTRING
and friends into a new windows-strings
crate before I can add a dependency from windows-registry
. I need to do that anyway, so perhaps I'll wait on this PR and we can just use HSTRING
here.
To be honest, that does sound a lot more appealing to me now that I've considered it some more.
Fixes: #3119