aevyrie / bevy_mod_picking

Picking and pointer events for Bevy.
https://crates.io/crates/bevy_mod_picking
Apache License 2.0
764 stars 170 forks source link

derive `Copy` for `HitData` and adjust consumers #333

Closed databasedav closed 3 months ago

databasedav commented 3 months ago

from discord https://discord.com/channels/691052431525675048/1038322714320052304/1243630594928279704

Copy doesn't change the perf of those structs, but it will make it a breaking change to add a non-copy type to them in the future. Also want to be careful implementing it on types that are mutated, to prevent copying when moving is desired. That can lead to the situation where you think you have mutated something, but you've actually just mutated a copy, and the original is unchanged.