[solved] Fill a vector or a slice with a value

slice.fill(x) was proposed in drafts of RFC 1419 but didn't make the final cut because of open questions about what trade-offs it should make between performance guarantees versus flexibility.

Update: slice::fill was added in Rust 1.50.

2 Likes