Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGVSV committed Aug 18, 2022
1 parent 7e651bd commit b62e8f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions 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 @@ -655,7 +655,7 @@ impl<T: FromReflect> Enum for Option<T> {
fn drain(self: Box<Self>) -> Vec<Box<dyn Reflect>> {
match *self {
Some(value) => vec![Box::new(value) as Box<dyn Reflect>],
None => Vec::new()
None => Vec::new(),
}
}

Expand Down
1 change: 1 addition & 0 deletions crates/bevy_reflect/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ mod tests {
assert!(fields[0].reflect_partial_eq(&123usize).unwrap_or_default());

let struct_value: Box<dyn Struct> = Box::new(Bar { a: 123, b: 1.23 });
let x = struct_value.field_at(0).unwrap().clone_value();
let fields = struct_value.drain();
assert!(fields[0].reflect_partial_eq(&123_i32).unwrap_or_default());
assert!(fields[1].reflect_partial_eq(&1.23_f32).unwrap_or_default());
Expand Down

0 comments on commit b62e8f8

Please sign in to comment.