zeroed_slice_box returns Result (#28)

It returns `Result<(), Box>` instead of `Box`
`cargo check` catched it
How did it pass CI?
This commit is contained in:
Soveu 2020-07-25 23:26:28 +02:00 committed by GitHub
parent d02404cb65
commit 52be254e2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,7 @@ pub fn try_zeroed_slice_box<T: Pod>(length: usize) -> Result<Box<[T]>, ()> {
}
/// As [`try_zeroed_slice_box`](try_zeroed_slice_box), but unwraps for you.
pub fn zeroed_slice_box<T: Pod>(length: usize) -> Result<Box<[T]>, ()> {
pub fn zeroed_slice_box<T: Pod>(length: usize) -> Box<[T]> {
try_zeroed_slice_box(length).unwrap()
}