Skip to content

Add the copy trait to the colour struct#31

Merged
Hopson97 merged 2 commits intoHopson97:masterfrom
Astrid-Lauen:colour-copy
Aug 13, 2018
Merged

Add the copy trait to the colour struct#31
Hopson97 merged 2 commits intoHopson97:masterfrom
Astrid-Lauen:colour-copy

Conversation

@Astrid-Lauen
Copy link
Copy Markdown

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.

@Hopson97 Hopson97 merged commit 0a05d64 into Hopson97:master Aug 13, 2018
@Astrid-Lauen Astrid-Lauen deleted the colour-copy branch August 13, 2018 08:24
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