mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-23 23:32:24 +00:00
291a924518
Casting ZST to non-ZST will result in a slice length of 0. Casting non-ZST to ZST will only work if the input slice has length 0, and results in a slice length of 0; if the input slice is not of length 0, PodCastError::OutputSliceWouldHaveSlop is returned. Updates the docs of the PodCastError variants to reflect when they can occur. Updates the docs of try_cast_slice (and checked::) to remove note about ZST <-> non-ZST not being allowed. Update bytes_of(_mut) to remove ZST check, since casting [ZST] -> [u8] is now allowed directly using cast_slice(_mut). Update must_cast_slice checks and doctests to allow [ZST] -> [non-ZST], but disallow [non-ZST] -> [ZST]. |
||
---|---|---|
.. | ||
array_tests.rs | ||
cast_slice_tests.rs | ||
checked_tests.rs | ||
derive.rs | ||
doc_tests.rs | ||
offset_of_tests.rs | ||
std_tests.rs | ||
transparent.rs | ||
wrapper_forgets.rs |