Fix Into conversion involving generic remote derive with getter
This commit is contained in:
parent
7328b34810
commit
37021910c9
@ -712,8 +712,9 @@ fn deserialize_seq(
|
||||
|
||||
if params.has_getter {
|
||||
let this_type = ¶ms.this_type;
|
||||
let (_, ty_generics, _) = params.generics.split_for_impl();
|
||||
result = quote! {
|
||||
_serde::__private::Into::<#this_type>::into(#result)
|
||||
_serde::__private::Into::<#this_type #ty_generics>::into(#result)
|
||||
};
|
||||
}
|
||||
|
||||
@ -856,8 +857,9 @@ fn deserialize_newtype_struct(
|
||||
let mut result = quote!(#type_path(__field0));
|
||||
if params.has_getter {
|
||||
let this_type = ¶ms.this_type;
|
||||
let (_, ty_generics, _) = params.generics.split_for_impl();
|
||||
result = quote! {
|
||||
_serde::__private::Into::<#this_type>::into(#result)
|
||||
_serde::__private::Into::<#this_type #ty_generics>::into(#result)
|
||||
};
|
||||
}
|
||||
|
||||
@ -2629,8 +2631,9 @@ fn deserialize_map(
|
||||
let mut result = quote!(#struct_path { #(#result),* });
|
||||
if params.has_getter {
|
||||
let this_type = ¶ms.this_type;
|
||||
let (_, ty_generics, _) = params.generics.split_for_impl();
|
||||
result = quote! {
|
||||
_serde::__private::Into::<#this_type>::into(#result)
|
||||
_serde::__private::Into::<#this_type #ty_generics>::into(#result)
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,7 @@ mod remote {
|
||||
}
|
||||
|
||||
impl<T> StructGeneric<T> {
|
||||
#[allow(dead_code)]
|
||||
pub fn get_value(&self) -> &T {
|
||||
&self.value
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user