Skip to content

Commit c9f96bc

Browse files
committed
Added Function to PartialReflect::debug
1 parent 5311a7f commit c9f96bc

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

crates/bevy_reflect/src/reflect.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
use crate::{
2-
array_debug, enum_debug, list_debug, map_debug, serde::Serializable, struct_debug, tuple_debug,
3-
tuple_struct_debug, Array, DynamicTypePath, DynamicTyped, Enum, List, Map, Set, Struct, Tuple,
4-
TupleStruct, TypeInfo, TypePath, Typed, ValueInfo,
2+
array_debug, enum_debug, list_debug, map_debug, serde::Serializable, set_debug, struct_debug,
3+
tuple_debug, tuple_struct_debug, Array, DynamicTypePath, DynamicTyped, Enum, List, Map, Set,
4+
Struct, Tuple, TupleStruct, TypeInfo, TypePath, Typed, ValueInfo,
55
};
6+
use core::fmt::Pointer;
67
use std::{
78
any::{Any, TypeId},
89
fmt::Debug,
@@ -375,8 +376,11 @@ where
375376
ReflectRef::List(dyn_list) => list_debug(dyn_list, f),
376377
ReflectRef::Array(dyn_array) => array_debug(dyn_array, f),
377378
ReflectRef::Map(dyn_map) => map_debug(dyn_map, f),
379+
ReflectRef::Set(dyn_set) => set_debug(dyn_set, f),
378380
ReflectRef::Enum(dyn_enum) => enum_debug(dyn_enum, f),
379-
_ => write!(f, "Reflect({})", self.reflect_type_path()),
381+
#[cfg(feature = "functions")]
382+
ReflectRef::Function(dyn_function) => dyn_function.fmt(f),
383+
ReflectRef::Value(_) => write!(f, "Reflect({})", self.reflect_type_path()),
380384
}
381385
}
382386

0 commit comments

Comments
 (0)