-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
ArrayType<MaybeUninit<T>> = [MaybeUninit<T>; N]
bounds
This makes it possible to call `Array::uninit` from `Array::try_from_fn` without propagating this bound, both to that function and everything else that calls it, including `try_from_iter` and the `FromIterator` trait impl. This bound can be useful in places where we need access to `N`, but in the specific cae of `Array::uninit` it's effectively an implementation detail which, when provided, made clippy happy, because it could see the inner type was a `MaybeUninit` array. The safety comments spell out the rationale for why this is sound, which effectively boils down to "uninitialized memory requires no initialization".
- Loading branch information
Showing
2 changed files
with
15 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters