fix: unwrap inner type
This commit is contained in:
parent
da3a53c92f
commit
234bb59d06
1 changed files with 8 additions and 1 deletions
|
@ -137,7 +137,14 @@ fn derive_impl(input: syn::DeriveInput) -> syn::Result<TokenStream> {
|
|||
|
||||
if field.attrs.iter().any(|attr| attr.path().is_ident("relax")) {
|
||||
// nested
|
||||
Ok(quote! { #vis #name: ::std::option::Option<<#ty as Relax>::Partial> })
|
||||
match get_generic_ty("Option", ty) {
|
||||
Some(ty) => {
|
||||
Ok(quote! { #vis #name: ::std::option::Option<<#ty as Relax>::Partial> })
|
||||
}
|
||||
None => {
|
||||
Ok(quote! { #vis #name: ::std::option::Option<<#ty as Relax>::Partial> })
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// not nested
|
||||
match get_generic_ty("Option", ty) {
|
||||
|
|
Loading…
Reference in a new issue