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

Fix Issue 21201 - let std.uuid.parseUUID accept input ranges whose elements are char or wchar, not just dchar #7607

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

n8sh
Copy link
Member

@n8sh n8sh commented Aug 27, 2020

All characters of interest to std.uuid.parseUUID are ASCII so there is no reason it cannot work on a range of chars or wchars.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @n8sh!

Bugzilla references

Auto-close Bugzilla Severity Description
21201 enhancement let std.uuid.parseUUID accept input ranges whose elements are char or wchar, not just dchar

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#7607"

std/uuid.d Outdated
{
import std.utf : byCodeUnit;
auto range = "8AB3060E-2CBA-4F23-b74c-B52Db3BDFB46".byCodeUnit;
assert(parseUUID(range). data == [138, 179, 6, 14, 44, 186, 79, 35, 183, 76, 181, 45, 179, 189, 251, 70]);
Copy link
Member

Choose a reason for hiding this comment

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

Phobos style is no whitespace after dot.

…ements are char or wchar, not just dchar

All characters of interest to std.uuid.parseUUID are ASCII so there is
no reason it cannot work on a range of chars or wchars.
@dlang-bot dlang-bot merged commit a3c3ea7 into dlang:master Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants