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 IntoBytes::to_bytes without Self: NoCell bound #714

Closed
joshlf opened this issue Dec 11, 2023 · 1 comment
Closed

Add IntoBytes::to_bytes without Self: NoCell bound #714

joshlf opened this issue Dec 11, 2023 · 1 comment

Comments

@joshlf
Copy link
Member

joshlf commented Dec 11, 2023

The existing IntoBytes::as_bytes method has the signature fn as_bytes(&self) -> &[u8] and requires Self: NoCell. Once #248 has landed, we can add a fn to_bytes(&self) -> [u8; size_of::<Self>()] method that does not require Self: NoCell.

@joshlf
Copy link
Member Author

joshlf commented Oct 6, 2024

This would be unsound.

@joshlf joshlf closed this as completed Oct 6, 2024
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

No branches or pull requests

1 participant