vk-rs
vk-rs copied to clipboard
Automatically derive Clone and Debug
Currently, the implementations appear to be manually generated.
This is intentional. Automatic derives are used in situations where they can be used, which is true of most structs. However, there are a couple cases where manual implementations are needed, because the underlying types don't directly implement the trait. The main case of this I can remember is implementing Derive
on structs containing an array with a length greater than 32
- Derive
isn't implemented on the array, so we have to convert the fields to slices before they can be printed, and that has to be done manually.
The custom Clone
implementation was there to work around a compiler bug, with some types implementing Copy
but not clone. That may be fixed by now, though, so I'll look into removing it.