Skip to content

Commit

Permalink
Revert "Use FromReflect when deserializing"
Browse files Browse the repository at this point in the history
This reverts commit 15b7aef8525f6f1b4ba01481a61c260f2e183f00.
  • Loading branch information
MrGVSV committed Jun 18, 2023
1 parent 4b2ebdd commit 56d11a2
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 257 deletions.
5 changes: 2 additions & 3 deletions crates/bevy_reflect/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,6 @@ mod tests {
struct Foo {
a: u32,
#[reflect(ignore)]
#[reflect(default)]
_b: u32,
c: Vec<isize>,
d: HashMap<usize, i8>,
Expand Down Expand Up @@ -1018,9 +1017,9 @@ mod tests {
let mut deserializer = Deserializer::from_str(&serialized).unwrap();
let reflect_deserializer = UntypedReflectDeserializer::new(&registry);
let value = reflect_deserializer.deserialize(&mut deserializer).unwrap();
let output = value.take::<Foo>().unwrap();
let dynamic_struct = value.take::<DynamicStruct>().unwrap();

assert!(foo.reflect_partial_eq(&output).unwrap());
assert!(foo.reflect_partial_eq(&dynamic_struct).unwrap());
}

#[test]
Expand Down
Loading

0 comments on commit 56d11a2

Please sign in to comment.