Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Implement Debug for dynamic types #5948

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/bevy_reflect/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ impl ArrayInfo {
/// can be mutated— just that the _number_ of items cannot change.
///
/// [`DynamicList`]: crate::DynamicList
#[derive(Debug)]
pub struct DynamicArray {
pub(crate) name: String,
pub(crate) values: Box<[Box<dyn Reflect>]>,
Expand Down
3 changes: 2 additions & 1 deletion crates/bevy_reflect/src/enums/dynamic_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::any::Any;
use std::fmt::Formatter;

/// A dynamic representation of an enum variant.
#[derive(Debug)]
pub enum DynamicVariant {
Unit,
Tuple(DynamicTuple),
Expand Down Expand Up @@ -72,7 +73,7 @@ impl From<()> for DynamicVariant {
/// // Tada!
/// assert_eq!(None, value);
/// ```
#[derive(Default)]
#[derive(Default, Debug)]
pub struct DynamicEnum {
name: String,
variant_name: String,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_reflect/src/tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl TupleInfo {
}

/// A tuple which allows fields to be added at runtime.
#[derive(Default)]
#[derive(Default, Debug)]
pub struct DynamicTuple {
name: String,
fields: Vec<Box<dyn Reflect>>,
Expand Down