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

Implement from_utf16le, from_utf16be, from_utf16ne #207

Merged
merged 1 commit into from
Aug 16, 2022
Merged

Implement from_utf16le, from_utf16be, from_utf16ne #207

merged 1 commit into from
Aug 16, 2022

Conversation

Kijewski
Copy link
Contributor

No description provided.

Copy link
Owner

@ParkMyCar ParkMyCar 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 PR! The test setup looks great! Just a few comments :)

compact_str/src/lib.rs Outdated Show resolved Hide resolved
compact_str/src/lib.rs Outdated Show resolved Hide resolved
compact_str/src/lib.rs Outdated Show resolved Hide resolved
compact_str/src/lib.rs Show resolved Hide resolved
compact_str/src/lib.rs Show resolved Hide resolved
@Kijewski
Copy link
Contributor Author

Thank you for your review! :) I made the requested changes. I also saw the comment in from_utf16() about rust-lang/rust#48994, so I don't use collect::<Result<_, _>>().

Yes, with from_utf16ne() we would give the user a footgun to create platform incompatible code. The input should contain a BOM, or the user should use some other means to tell the endianness.

@ParkMyCar ParkMyCar merged commit b1f7f42 into ParkMyCar:main Aug 16, 2022
@ParkMyCar
Copy link
Owner

Wooo! Looks great! Thanks!

@Kijewski Kijewski deleted the pr-utf16 branch August 16, 2022 14:31
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.

2 participants