Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gamepad
type is Copy
; do not require / return references to it in…
… `Gamepads` API (#5296) # Objective - The `Gamepad` type is a tiny value-containing type that implements `Copy`. - By convention, references to `Copy` types should be avoided, as they can introduce overhead and muddle the semantics of what's going on. - This allows us to reduce boilerplate reference manipulation and lifetimes in user facing code. ## Solution - Make assorted methods on `Gamepads` take / return a raw `Gamepad`, rather than `&Gamepad`. ## Migration Guide - `Gamepads::iter` now returns an iterator of `Gamepad`. rather than an iterator of `&Gamepad`. - `Gamepads::contains` now accepts a `Gamepad`, rather than a `&Gamepad`.
- Loading branch information
1 parent
927441d
commit 5849042
Showing
2 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters