We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
to_variant
1 parent e2fc055 commit 54352b8Copy full SHA for 54352b8
gdnative-derive/src/variant/to.rs
@@ -48,10 +48,12 @@ pub(crate) fn expand_to_variant(
48
let tokens = quote! {
49
#ident::#var_ident #destructure_pattern => {
50
let __dict = ::gdnative::core_types::Dictionary::new();
51
- let __key = ::gdnative::core_types::GodotString::from(#var_ident_string_literal).to_variant();
+ let __key = ::gdnative::core_types::ToVariant::to_variant(
52
+ &::gdnative::core_types::GodotString::from(#var_ident_string_literal)
53
+ );
54
let __value = #to_variant;
55
__dict.insert(&__key, &__value);
- __dict.into_shared().to_variant()
56
+ ::gdnative::core_types::ToVariant::to_variant(&__dict.into_shared())
57
}
58
};
59
Ok(tokens)
0 commit comments