diff --git a/crates/bevy_reflect/src/impls/bevy_ecs.rs b/crates/bevy_reflect/src/impls/bevy_ecs.rs index a50e61f1a3241..0a05ffbc491e2 100644 --- a/crates/bevy_reflect/src/impls/bevy_ecs.rs +++ b/crates/bevy_reflect/src/impls/bevy_ecs.rs @@ -149,7 +149,7 @@ impl, Runtime: Component> FromType(scene_entity).unwrap(); - let destination_component = scene_component.into_component(resources); + let destination_component = scene_component.as_component(resources); runtime_world .insert_one(runtime_entity, destination_component) .unwrap(); @@ -195,7 +195,7 @@ impl, Scene: Component> FromType(runtime_entity).unwrap(); - let scene_component = runtime_component.into_component(resources); + let scene_component = runtime_component.as_component(resources); scene_world .insert_one(scene_entity, scene_component) .unwrap(); @@ -236,6 +236,10 @@ impl FromType for ReflectMapEntities { } } +// TODO: Dead code - this trait is never implemented +// The name of the method was changed in +// to fix the update to clippy for Rust 1.50 +// which is why this is inconsistent pub trait IntoComponent { - fn into_component(&self, resources: &Resources) -> ToComponent; + fn as_component(&self, resources: &Resources) -> ToComponent; } diff --git a/crates/bevy_reflect/src/type_registry.rs b/crates/bevy_reflect/src/type_registry.rs index 6fa39145b3540..ac2779d7fe7f3 100644 --- a/crates/bevy_reflect/src/type_registry.rs +++ b/crates/bevy_reflect/src/type_registry.rs @@ -218,6 +218,8 @@ where } } +// TODO: Dead code +// This trait seems to be unused apart from in implementations of this trait pub trait FromType { fn from_type() -> Self; }