bevy/crates/bevy_reflect/src
Nicholas Nethercote b8072864aa
Streamline GetOwnership/FromArg/IntoReturn (#20126)
# Objective

Three impls are generated for each of these traits when the
`reflect_functions` feature is enabled.

Helps with #19873.

## Solution

Two of the three (the `&T` and `&mut T` ones) can be avoided by instead
providing blanket impls. The impl for `T` remains.

## Testing

I checked the output via `cargo expand`.

According to `-Zmacro-stats`, the size of the `Reflect` code generate
for `bevy_ui` drops by 10.4%.
2025-07-14 21:57:34 +00:00
..
enums deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
func Streamline GetOwnership/FromArg/IntoReturn (#20126) 2025-07-14 21:57:34 +00:00
impls Streamline GetOwnership/FromArg/IntoReturn (#20126) 2025-07-14 21:57:34 +00:00
path Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
serde deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
array.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
attributes.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
error.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
fields.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
from_reflect.rs
generics.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
kind.rs Bump typos to 1.34.0 (#20013) 2025-07-07 20:15:06 +00:00
lib.rs bevy_reflect: Avoid trait bounds on non-generic types (#19929) 2025-07-07 19:53:14 +00:00
list.rs More uninlined_format_args fixes (#19396) 2025-05-28 02:35:18 +00:00
map.rs Fix PartialReflect::apply for maps, remove get_at/_mut from Map trait (#19802) 2025-06-25 15:42:01 +00:00
reflect.rs bevy_reflect: Introduce reflect_clone_and_take. (#19944) 2025-07-07 19:57:29 +00:00
reflectable.rs
remote.rs
set.rs Fix PartialReflect::apply for maps, remove get_at/_mut from Map trait (#19802) 2025-06-25 15:42:01 +00:00
std_traits.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
struct_trait.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
tuple_struct.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
tuple.rs Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
type_info_stack.rs
type_info.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00
type_path.rs
type_registry.rs Add newlines before impl blocks (#19746) 2025-06-22 23:07:02 +00:00
utility.rs deny(missing_docs) for bevy_reflect (#19481) 2025-06-16 21:26:24 +00:00