rust
rust copied to clipboard
vec::from_fn documentation says it returns an immutable vector
Same for vec::from_elem. But I think they do not return an immutable vector.
Yes, the return type is an immutable vector. Why do you think it's not?
It should probably just say it returns an owned vector.