Skip to content

Conversation

@KodrAus
Copy link
Member

@KodrAus KodrAus commented Oct 31, 2021

Part of #537

In #336 we introduced conversions between Windows GUIDs and UUIDs. These didn't attempt to swap the ordering of the fields in any way. GUID specifies its fields as being in the native endianness (which for Windows is basically always little endian), while UUID requires them to be big endian. So we started flipping those fields coming from GUIDs in #345. Unfortunately, this seems like it was the wrong thing to do. All GUIDs I've been able to find already have the right ordering for UUIDs, so we've just been mangling them and losing the UUID version and variant.

This PR fixes that by removing the endianness conversion. We're going to be pulling this out into a separate crate before stabilizing so we can call out the change there. Anybody who actually does want to flip bytes between GUID and UUID fields can use the from_fields_le and to_fields_le methods.

@KodrAus KodrAus merged commit 66a544d into uuid-rs:main Oct 31, 2021
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.

1 participant