Skip to content

Commit 3b324ad

Browse files
committed
Make reflect serializer fields private
1 parent d305f39 commit 3b324ad

File tree

1 file changed

+5
-5
lines changed
  • crates/bevy_reflect/src/serde

1 file changed

+5
-5
lines changed

crates/bevy_reflect/src/serde/ser.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ fn get_serializable<'a, E: Error>(
145145
/// [`ReflectDeserializer`]: crate::serde::ReflectDeserializer
146146
/// [type path]: crate::TypePath::type_path
147147
pub struct ReflectSerializer<'a> {
148-
pub value: &'a dyn PartialReflect,
149-
pub registry: &'a TypeRegistry,
148+
value: &'a dyn PartialReflect,
149+
registry: &'a TypeRegistry,
150150
}
151151

152152
impl<'a> ReflectSerializer<'a> {
@@ -223,8 +223,8 @@ impl<'a> Serialize for ReflectSerializer<'a> {
223223
/// [`TypedReflectDeserializer`]: crate::serde::TypedReflectDeserializer
224224
/// [type path]: crate::TypePath::type_path
225225
pub struct TypedReflectSerializer<'a> {
226-
pub value: &'a dyn PartialReflect,
227-
pub registry: &'a TypeRegistry,
226+
value: &'a dyn PartialReflect,
227+
registry: &'a TypeRegistry,
228228
}
229229

230230
impl<'a> TypedReflectSerializer<'a> {
@@ -235,7 +235,7 @@ impl<'a> TypedReflectSerializer<'a> {
235235
.reflect_type_path()
236236
.starts_with("bevy_reflect::boxed::ReflectBox<dyn"),
237237
);
238-
TypedReflectSerializer { value, registry }
238+
Self { value, registry }
239239
}
240240

241241
fn new_reflect_box(value: &'a dyn PartialReflect, registry: &'a TypeRegistry) -> Self {

0 commit comments

Comments
 (0)