bevy/crates/bevy_reflect/src/func
poopy 15f00278e7
Rename ArgList::push methods to with and add new push methods which take &mut self (#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>
2025-01-28 05:06:50 +00:00
..
args Rename ArgList::push methods to with and add new push methods which take &mut self (#16567) 2025-01-28 05:06:50 +00:00
dynamic_function_internal.rs Move hashbrown and foldhash out of bevy_utils (#17460) 2025-01-23 16:46:08 +00:00
dynamic_function_mut.rs Rename ArgList::push methods to with and add new push methods which take &mut self (#16567) 2025-01-28 05:06:50 +00:00
dynamic_function.rs Rename ArgList::push methods to with and add new push methods which take &mut self (#16567) 2025-01-28 05:06:50 +00:00
error.rs Move hashbrown and foldhash out of bevy_utils (#17460) 2025-01-23 16:46:08 +00:00
function.rs Rename ArgList::push methods to with and add new push methods which take &mut self (#16567) 2025-01-28 05:06:50 +00:00
info.rs bevy_reflect: Apply #[deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)] (#17092) 2025-01-03 22:22:34 +00:00
into_function_mut.rs Rename ArgList::push methods to with and add new push methods which take &mut self (#16567) 2025-01-28 05:06:50 +00:00
into_function.rs Rename ArgList::push methods to with and add new push methods which take &mut self (#16567) 2025-01-28 05:06:50 +00:00
macros.rs Remove Implicit std Prelude from no_std Crates (#17086) 2025-01-03 01:58:43 +00:00
mod.rs Rename ArgList::push methods to with and add new push methods which take &mut self (#16567) 2025-01-28 05:06:50 +00:00
reflect_fn_mut.rs Rename ArgList::push methods to with and add new push methods which take &mut self (#16567) 2025-01-28 05:06:50 +00:00
reflect_fn.rs Rename ArgList::push methods to with and add new push methods which take &mut self (#16567) 2025-01-28 05:06:50 +00:00
registry.rs Rename ArgList::push methods to with and add new push methods which take &mut self (#16567) 2025-01-28 05:06:50 +00:00
return_type.rs Remove Implicit std Prelude from no_std Crates (#17086) 2025-01-03 01:58:43 +00:00
signature.rs Move hashbrown and foldhash out of bevy_utils (#17460) 2025-01-23 16:46:08 +00:00