Skip to content

Commit 05d2013

Browse files
authored
Simplify AnimatableProperty::Property trait bounds (bevyengine#15495)
# Objective - Fixes bevyengine#15392. ## Solution - Use `Reflectable` in place of `GetTypeRegistration + Reflect + TypePath + Typed`.
1 parent 4a013b6 commit 05d2013

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

crates/bevy_animation/src/keyframes.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use core::{
88
use bevy_derive::{Deref, DerefMut};
99
use bevy_ecs::{component::Component, world::Mut};
1010
use bevy_math::{Quat, Vec3};
11-
use bevy_reflect::{FromReflect, GetTypeRegistration, Reflect, TypePath, Typed};
11+
use bevy_reflect::{FromReflect, Reflect, Reflectable, TypePath};
1212
use bevy_render::mesh::morph::MorphWeights;
1313
use bevy_transform::prelude::Transform;
1414

@@ -69,16 +69,7 @@ pub trait AnimatableProperty: Reflect + TypePath + 'static {
6969
type Component: Component;
7070

7171
/// The type of the property to be animated.
72-
type Property: Animatable
73-
+ FromReflect
74-
+ GetTypeRegistration
75-
+ Reflect
76-
+ TypePath
77-
+ Typed
78-
+ Clone
79-
+ Sync
80-
+ Debug
81-
+ 'static;
72+
type Property: Animatable + FromReflect + Reflectable + Clone + Sync + Debug + 'static;
8273

8374
/// Given a reference to the component, returns a reference to the property.
8475
///

0 commit comments

Comments
 (0)