Re: [PATCH v2 1/2] rust: non_empty: add NonEmpty

From: Lorenzo Delgado

Date: Tue Oct 13 2026 - 13:15:45 EST


On Tue Oct 13, 2026 at 2:54 PM BST, Gary Guo wrote:
>> + pub fn from_array_mut<const N: usize>(array: &mut [T; N]) -> &mut Self {
>
> Construction of array should be of form
>
> &&mut [T; N] --construct--> &mut NonEmpty<[T; N]> --unsize coercion--> &mut NonEmpty<[T]>

Good point, no need to go through the slice then. I'll make it a
`from_mut()` on `NonEmpty<[T; N]>` in v3.

Thanks,
Lorenzo