File tree Expand file tree Collapse file tree 9 files changed +9
-19
lines changed Expand file tree Collapse file tree 9 files changed +9
-19
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ keywords = [
1616categories = [" development-tools" , " encoding" ]
1717
1818[dependencies ]
19- unsynn = " 0.1.0"
20- quote = " 1.0.40"
19+ unsynn = " 0.2"
2120
2221[features ]
2322function = []
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ pub fn parse_fn_shape_input(input: TokenStream) -> ParsedFnShapeInput {
4141#[ cfg( test) ]
4242mod tests {
4343 use super :: * ;
44- use quote:: quote;
4544
4645 #[ test]
4746 fn test_simple_function_name ( ) {
Original file line number Diff line number Diff line change @@ -27,15 +27,14 @@ pub fn parse_function_body(tokens: &[TokenTree]) -> TokenStream {
2727 Ok ( func_with_body) => func_with_body. body . to_token_stream ( ) ,
2828 Err ( _) => {
2929 // No function body found, return empty braces
30- quote:: quote ! { { } }
30+ quote ! { { } }
3131 }
3232 }
3333}
3434
3535#[ cfg( test) ]
3636mod tests {
3737 use super :: * ;
38- use quote:: quote;
3938
4039 #[ test]
4140 fn test_simple_function_body ( ) {
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ pub fn parse_fn_parameters(params_ts: TokenStream) -> Vec<Parameter> {
3535#[ cfg( test) ]
3636mod tests {
3737 use super :: * ;
38- use quote:: quote;
3938
4039 #[ test]
4140 fn test_empty_parameters ( ) {
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ pub fn parse_function_signature(input: TokenStream) -> FunctionSignature {
9999 let return_type = sig
100100 . return_type
101101 . map ( |rt| rt. return_type . to_token_stream ( ) )
102- . unwrap_or_else ( || quote:: quote ! { ( ) } ) ;
102+ . unwrap_or_else ( || quote ! { ( ) } ) ;
103103
104104 // Extract body
105105 let body = sig. body . to_token_stream ( ) ;
@@ -125,7 +125,6 @@ pub fn parse_function_signature(input: TokenStream) -> FunctionSignature {
125125#[ cfg( test) ]
126126mod tests {
127127 use super :: * ;
128- use quote:: quote;
129128
130129 #[ test]
131130 fn test_simple_function ( ) {
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ pub fn parse_generics_for_test(input: TokenStream) -> Option<GenericParams> {
3939#[ cfg( test) ]
4040mod tests {
4141 use super :: * ;
42- use quote:: quote;
4342
4443 #[ test]
4544 fn test_no_generics ( ) {
Original file line number Diff line number Diff line change @@ -26,15 +26,14 @@ pub fn parse_return_type(tokens: Vec<TokenTree>) -> TokenStream {
2626 Ok ( ret_type) => ret_type. return_type . to_token_stream ( ) ,
2727 Err ( _) => {
2828 // No return type found, default to unit type
29- quote:: quote ! { ( ) }
29+ quote ! { ( ) }
3030 }
3131 }
3232}
3333
3434#[ cfg( test) ]
3535mod tests {
3636 use super :: * ;
37- use quote:: quote;
3837
3938 #[ test]
4039 fn test_no_return_type ( ) {
Original file line number Diff line number Diff line change @@ -10,33 +10,31 @@ pub fn extract_type_params(generics_ts: TokenStream) -> TokenStream {
1010
1111 match it. parse :: < GenericParams > ( ) {
1212 Ok ( generics) => {
13- let type_param_names: Vec < _ > = generics
13+ let type_param_names: CommaDelimitedVec < _ > = generics
1414 . params
1515 . 0
1616 . into_iter ( )
1717 . map ( |delim| delim. value . name )
1818 . collect ( ) ;
1919
2020 if type_param_names. is_empty ( ) {
21- quote:: quote ! { ( ) }
21+ quote ! { ( ) }
2222 } else if type_param_names. len ( ) == 1 {
23- let param = & type_param_names[ 0 ] ;
24- quote:: quote! { #param }
23+ quote ! { #type_param_names }
2524 } else {
26- quote:: quote ! { ( #( # type_param_names ) , * ) }
25+ quote ! { ( #type_param_names ) }
2726 }
2827 }
2928 Err ( _) => {
3029 // Fallback to unit type if parsing fails
31- quote:: quote ! { ( ) }
30+ quote ! { ( ) }
3231 }
3332 }
3433}
3534
3635#[ cfg( test) ]
3736mod tests {
3837 use super :: * ;
39- use quote:: quote;
4038
4139 #[ test]
4240 fn test_single_type_param ( ) {
Original file line number Diff line number Diff line change @@ -600,7 +600,6 @@ impl Struct {
600600#[ cfg( test) ]
601601mod tests {
602602 use super :: * ;
603- use quote:: quote;
604603
605604 #[ test]
606605 fn test_struct_with_field_doc_comments ( ) {
You can’t perform that action at this time.
0 commit comments