Skip to content

Commit

Permalink
Use a higher-rank trait bound to solve the lifetime error
Browse files Browse the repository at this point in the history
  • Loading branch information
CleanCut committed Mar 8, 2021
1 parent 9b261e6 commit 844782c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_reflect/src/impls/std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl<T: Reflect> Reflect for Vec<T> {
}
}

impl<'a, T: Reflect + Deserialize<'a>> GetTypeRegistration for Vec<T> {
impl<T: Reflect + for<'de> Deserialize<'de>> GetTypeRegistration for Vec<T> {
fn get_type_registration() -> TypeRegistration {
let mut registration = TypeRegistration::of::<Vec<T>>();
registration.insert::<ReflectDeserialize>(FromType::<Vec<T>>::from_type());
Expand Down

0 comments on commit 844782c

Please sign in to comment.