bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Input uses references when possible

Open mockersf opened this issue 1 year ago • 2 comments

Objective

  • As noted in https://github.com/bevyengine/bevy/discussions/14180, there's no reason for some of input methods to use T instead of &T

Solution

  • Use references when possible for input
  • Also update touches the same way for symmetry

Not using references is mostly not a problem in Bevy because most build in inputs are small types. It feels more correct to take references and it will be better for larger input types

mockersf avatar Jul 06 '24 13:07 mockersf

Wondering if this needs a Migration note since some public signatures changed.

yes it should...

But I'm not sure I like this PR. It's the right thing to do, but there soo many additional &...

mockersf avatar Jul 06 '24 21:07 mockersf

It looks like your PR is a breaking change, but you didn't provide a migration guide.

Could you add some context on what users should update when this change get released in a new version of Bevy? It will be used to help writing the migration guide for the version. Putting it after a ## Migration Guide will help it get automatically picked up by our tooling.

github-actions[bot] avatar Jul 09 '24 23:07 github-actions[bot]

Has merge conflicts, waiting on migration guide

BenjaminBrienen avatar May 17 '25 09:05 BenjaminBrienen