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

add repr transparent to Pointer #49

Merged
merged 1 commit into from
Jun 30, 2024
Merged

add repr transparent to Pointer #49

merged 1 commit into from
Jun 30, 2024

Conversation

asmello
Copy link
Collaborator

@asmello asmello commented Jun 29, 2024

I missed this when first implementing the slice-like Pointer type. I think the compiler will use the same layout as str regardless, but it's important to make sure. This assumption is needed for the unsafe code used in this type to be sound.

@chanced
Copy link
Owner

chanced commented Jun 30, 2024

Awesome! Should we do the same for PointerBuf?

@asmello
Copy link
Collaborator Author

asmello commented Jun 30, 2024

No, PointerBuf doesn't have any unsafe code that relies on the internal layout of the type. 👍

@chanced
Copy link
Owner

chanced commented Jun 30, 2024

Awesome, thanks.

heh, as an aside, I really need to get better about proofreading my comments written on my phone. So many incoherent sentences 🤦‍♂️

@chanced chanced merged commit c415881 into chanced:main Jun 30, 2024
1 check passed
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