From c145cefc327a20b84db095872858eae098333d81 Mon Sep 17 00:00:00 2001 From: wandalen Date: Wed, 10 Apr 2024 14:38:51 +0300 Subject: [PATCH] former : experimenting --- module/core/macro_tools/src/generics.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/module/core/macro_tools/src/generics.rs b/module/core/macro_tools/src/generics.rs index 05810d7943..43aa92b40b 100644 --- a/module/core/macro_tools/src/generics.rs +++ b/module/core/macro_tools/src/generics.rs @@ -184,7 +184,10 @@ pub( crate ) mod private } /// Extract generics from a type. - pub fn extract_from_type( type_example : &syn::Type ) -> Option< syn::PathArguments > + // pub fn extract_from_type( type_example : &syn::Type ) -> Option< syn::PathArguments > + pub fn extract_from_type( type_example : &syn::Type ) + -> + Option< syn::punctuated::Punctuated< syn::GenericArgument, syn::token::Comma > > { if let syn::Type::Path( type_path ) = type_example { @@ -193,7 +196,7 @@ pub( crate ) mod private if let syn::PathArguments::AngleBracketed( generics ) = &last_segment.arguments { - return Some( generics.clone() ); + return Some( generics.args.clone() ); } } None