We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I noticed that the documentation of both bytes_of and bytes_of_mut says:
bytes_of
bytes_of_mut
Any ZST becomes an empty slice
But instead of returning an empty slice, it actually causes a runtime panic. E.g., when executing:
use bytemuck; fn main() { let zst: [u32; 0] = []; let _result = bytemuck::bytes_of(&zst); // Panic: entered unreachable code }
The text was updated successfully, but these errors were encountered:
Well spotted. I'll try to fix this later today.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Hi, I noticed that the documentation of both
bytes_of
andbytes_of_mut
says:But instead of returning an empty slice, it actually causes a runtime panic. E.g., when executing:
The text was updated successfully, but these errors were encountered: