Skip to content

Add array-init crate#12

Merged
Turbo87 merged 1 commit into
mainfrom
array-init
Jun 16, 2026
Merged

Add array-init crate#12
Turbo87 merged 1 commit into
mainfrom
array-init

Conversation

@Turbo87

@Turbo87 Turbo87 commented Jun 16, 2026

Copy link
Copy Markdown
Member

core::array::from_fn (stable since Rust 1.63) builds a fixed-size array from an index closure, covering the crate's headline array_init use. The fallible variant (try_from_fn) is still unstable and the iterator-based constructors (from_iter / from_iter_reversed) have no std equivalent, so this is flagged as a partial replacement.

@Manishearth 👋 does this seem accurate to you? any objections? (see rust-lang/crates.io#13855 for more information)

@Manishearth

Copy link
Copy Markdown
Member

Seems fine!

@Turbo87

Turbo87 commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

thanks for the confirmation :)

@Turbo87
Turbo87 merged commit 0bda9e4 into main Jun 16, 2026
2 checks passed
@Turbo87
Turbo87 deleted the array-init branch June 16, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants