forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename
ArgList::push
methods to with
and add new push
methods w…
…hich take `&mut self` (bevyengine#16567) # Objective The `ArgList::push` family of methods consume `self` and return a new `ArgList` which means they can't be used with `&mut ArgList` references. ```rust fn foo(args: &mut ArgList) { args.push_owned(47_i32); // doesn't work :( } ``` It's typical for `push` methods on other existing types to take `&mut self`. ## Solution Renamed the existing push methods to `with_arg`, `with_ref` etc and added new `push` methods which take `&mut self`. ## Migration Guide Uses of the `ArgList::push` methods should be replaced with the `with` counterpart. <details> | old | new | | --- | --- | | push_arg | with_arg | | push_ref | with_ref | | push_mut | with_mut | | push_owned | with_owned | | push_boxed | with_boxed | </details>
- Loading branch information
Showing
13 changed files
with
193 additions
and
153 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
Oops, something went wrong.