Skip to content

Commit

Permalink
Auto merge of #130829 - Urgau:option_array_transpose, r=ibraheemdev
Browse files Browse the repository at this point in the history
Add `[Option<T>; N]::transpose`

This PR as a new unstable libs API, `[Option<T>; N]::transpose`, which permits going from `[Option<T>; N]` to `Option<[T; N]>`.

This new API doesn't have an ACP as it was directly asked by T-libs-api in rust-lang/rust#97601 (comment):

> [..] but it'd be trivial to provide a helper method `.transpose()` that turns array-of-Option into Option-of-array (**and we think that method should exist**; it already does for array-of-MaybeUninit).

r? libs
  • Loading branch information
bors committed Oct 2, 2024
2 parents 7503c71 + 10459f2 commit 9e5deb7
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 9e5deb7

Please sign in to comment.