Skip to content

Replace 'array::from_fn' where appropriate #1007

@elBoberido

Description

@elBoberido

Brief

There are some places, especially with the container, which are using an array of uninitialized T, e.g. [MaybeUninit<T>; CAPACITY]. The array is then initialized with array::from_fn.

When the array is initialized with the a constant value, e.g. MaybeUninit::uninit(), instead of using core::array::from_fn(|_| MaybeUninit::uninit()) to initialize the array, [const { MaybeUninit::uninit() }; CAPACITY] can be used instead.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions