Hopson97 / Asciimon

Pokemon-inspired game created using Rust for terminals which support ANSI escape commands.
124 stars 11 forks source link

Add the copy trait to the colour struct #31

Closed Astrid-Lauen closed 6 years ago

Astrid-Lauen commented 6 years ago

On a 64 bit computer, the size of a colour reference is eight bytes, which is almost three times the size of the colour struct itself (three bytes). Because of that, it doesn't make much sense to borrow instead of just copying.