Open
Description
Feature gate: #![feature(option_array_transpose)]
This is a tracking issue for the option_array_transpose
.
This feature permits going from an [Option<T>; N]
to Option<[T; N]>
.
Public API
// core::option
impl<T, const N: usize> [Option<T>; N] {
fn transpose(self) -> Option<[T; N]>;
}
Steps / History
- Implementation: Add
[Option<T>; N]::transpose
#130829 - Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- The operation is irreversible (contrary to the other
transpose
methods), should it be named differently? Add[Option<T>; N]::transpose
#130829 (comment)