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

Added conversions between HSTRING and OsStr/OsString #1693

Merged
merged 4 commits into from
Apr 15, 2022
Merged

Added conversions between HSTRING and OsStr/OsString #1693

merged 4 commits into from
Apr 15, 2022

Conversation

kaivol
Copy link
Contributor

@kaivol kaivol commented Apr 14, 2022

I think these conversions are all quite straightforward and self-explanatory.

I'm not sure what exactly is supposed to be hidden behind the alloc feature, and whether I have applied this correctly.

@ghost
Copy link

ghost commented Apr 14, 2022

CLA assistant check
All CLA requirements met.

Copy link
Collaborator

@kennykerr kennykerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

The alloc feature unlocks implicit allocations via the IntoParam trait. Your addition means that OsStr and OsString values can be used to call APIs that expect an HSTRING as an input parameter. This addresses part of #760.

I'm a little concerned about the explosion of trait implementations needed to add this support. We may want to consider adding a macro_rules at some point to get this under control especially when it comes to adding similar support for other types.

@kennykerr kennykerr merged commit 8041194 into microsoft:master Apr 15, 2022
@kennykerr
Copy link
Collaborator

0.36.0 has now been released and includes your contribution - thanks again!

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

Successfully merging this pull request may close these issues.

None yet

2 participants