book
book copied to clipboard
Add arrays to the list of types that implement `Copy`
This is interesting, I didn't realize that arrays were also able to be copy. Tested it and seems it's true.
I guess it's good to include it in the book but I always second guess giving too much information even if it's true and overwhelming beginners.
@c-git here is the reference.
If you prefer I can divide tuples and arrays in two sentences, maybe it becomes clearer.
Moreover in my opinion it would be helpful to add a background note explaining that differently from arrays, vectors (which are allocated in the heap instead of in the stack) do not implement the Copy trait.
If you agree I can add these two points to my PR.
I think it's fine as is. I wouldn't add more to it at this point. I guess reading the docs would have shortened my testing but it was still fun.