Re:Methods for Array Initialization in Rust (2018)
by CryZe on Monday May 24, 2021 @12:01PM
(#27265950)
There's also an open Pull Request for adding std::array::from_fn which calls the function / closure provided N times to initialize an array. This basically brings the array-init functionality into std.
https://github.com/rust-lang/rust/pull/75644