shepmaster / cupid

Get information about the x86 and x86_64 processor
MIT License
34 stars 9 forks source link

Make cpu query methods take references instead of consuming #2

Closed iirelu closed 9 years ago

iirelu commented 9 years ago

Previously, trying to run multiple queries on one Master struct did not compile, as the previous query moved the struct and destroyed it. All other query-able structs derived Copy, so this previously wasn't a problem, but Master can't as it contains non-copyable data.

shepmaster commented 9 years ago

This is great! It's exactly the change I would have made and the commit message is superb; you even precisely stated how it got to this state (the Copyable structs). I'm super impressed!