-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix panics in
try_cast_slice_box
etc (#254)
* Fix panics in try_cast_slice_{box,rc,arc},cast_vec. Casting from non-empty non-ZST slices to ZST slices now returns Err(SizeMismatch) (instead of panicking). Casting from empty non-ZST slices to ZST slices is allowed and returns an empty slice (instead of panicking). Casting from ZST slices to non-ZST slices is allowed and returns an empty slice (status quo). * Add tests for cast_slice_box,rc,arc.
- Loading branch information
Showing
2 changed files
with
162 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters