-
Notifications
You must be signed in to change notification settings - Fork 311
Open
Description
As Layout::array's document said, when the total size would exceed isize::MAX, returns LayoutError. Not the usize::MAX.
Lines 178 to 182 in 0d5f884
| // `Layout::array` checks that the number of bytes is <= usize::MAX, | |
| // but this is redundant since old_layout.size() <= isize::MAX, | |
| // so the `unwrap` should never fail. | |
| let new_layout = Layout::array::<T>(new_cap).unwrap(); | |
| (new_cap, new_layout) |
Metadata
Metadata
Assignees
Labels
No labels