Skip to content

Conversation

@KodrAus
Copy link
Member

@KodrAus KodrAus commented Nov 3, 2021

This PR removes the explicit Ref types for different formats in favor of casting a &Uuid. This is safe to do because the format types are #[repr(transparent)] and Copy.

I've also made the naming conventions consistent for all methods that produce and return Uuids and enhanced the docs.

@KodrAus
Copy link
Member Author

KodrAus commented Nov 3, 2021

@kinggoesgaming This basically changes our format adapters to be a single type. We make a reference to these types from a UUID when we want to avoid copying. This is a safe transmute because they’ve got the same ABI, implement Copy, and don’t implement Drop.

@KodrAus KodrAus merged commit e6a6dbd into uuid-rs:main Nov 3, 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