Skip to content

Commit 9724b9a

Browse files
committed
fix serializing DictionaryDispatch
1 parent f045ab4 commit 9724b9a

File tree

1 file changed

+3
-1
lines changed
  • gdnative-core/src/core_types/variant

1 file changed

+3
-1
lines changed

gdnative-core/src/core_types/variant/serde.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ impl Serialize for VariantDispatch {
139139
NodePath(v) => newtype_variant!(VariantType::NodePath, v),
140140
Rid(v) => newtype_variant!(VariantType::Rid, v),
141141
Object(_) => newtype_variant!(VariantType::Object, &Option::<()>::None),
142-
Dictionary(v) => newtype_variant!(VariantType::Dictionary, v),
142+
Dictionary(v) => {
143+
newtype_variant!(VariantType::Dictionary, &DictionaryDispatch(v.new_ref()))
144+
}
143145
VariantArray(v) => {
144146
//Allows serializing to non-self-describing formats by avoiding serializing `Variant`s
145147
let vec = v.iter().map(|v| v.dispatch()).collect::<Vec<_>>();

0 commit comments

Comments
 (0)