Skip to content

Commit

Permalink
former : experimenting
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandalen committed Apr 10, 2024
1 parent 93f26e4 commit c145cef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions module/core/macro_tools/src/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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
Expand Down

0 comments on commit c145cef

Please sign in to comment.