Skip to content

Use the Iterator → Array function from the Rust standard library #292

@jonasbb

Description

@jonasbb

https://github.com/rust-lang/rust/blob/afaf33dcafe9c7068b63eb997df221aa08db7c29/library/core/src/array/mod.rs#L563-L628

This is not a public function, so the code needs to be copied.
This is very likely be better than the existing code.
The function uses too many unstable features to be useful right now.

These issues track adding such a function to the standard library.
rust-lang/rust#69985
rust-lang/rust#81615

core::array::try_from_fn: Currently blocked on try trait v2. See tracking issue rust-lang/rust#89379

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions