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 Debug (and maybe other traits that take &(mut) self) for Unalign<T> where T: !Unaligned #207

Open
joshlf opened this issue Jul 29, 2023 · 0 comments
Labels
compatibility-nonbreaking Changes that are (likely to be) non-breaking

Comments

@joshlf
Copy link
Member

joshlf commented Jul 29, 2023

Use the technique described in #206, and maybe build on it if we add those methods.

One thing worth considering is whether it's acceptable to introduce the cost of copying 2 * size_of::<T>() bytes to trait impls that, for wrapper types, are supposed to just be passthroughs. Alternatively, we could just emit a simpler Debug impl that just prints the type's name but not its contents when T: !Unaligned.

@joshlf joshlf changed the title Implement Debug (and maybe other traits that take &self) for Unalign Implement Debug (and maybe other traits that take &(mut) self) for Unalign Jul 29, 2023
@joshlf joshlf changed the title Implement Debug (and maybe other traits that take &(mut) self) for Unalign Implement Debug (and maybe other traits that take &(mut) self) for Unalign<T> where T: !Unaligned Aug 1, 2023
@joshlf joshlf added the compatibility-nonbreaking Changes that are (likely to be) non-breaking label Aug 12, 2023
@joshlf joshlf mentioned this issue Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility-nonbreaking Changes that are (likely to be) non-breaking
Projects
None yet
Development

No branches or pull requests

1 participant