@@ -69,13 +69,13 @@ pub(crate) fn impl_lamellar_serde_trait(
6969 quote ! {
7070 impl #impl_generics #lamellar:: active_messaging:: LamellarSerde for #am_name #ty_generics #where_clause {
7171 fn serialized_size( & self ) ->usize {
72- #lamellar:: serialized_size( self , true )
72+ #lamellar:: serialized_size( self )
7373 }
7474 fn serialize_into( & self , buf: & mut [ u8 ] ) {
75- #lamellar:: serialize_into( buf, self , true ) . expect( "can serialize and enough space in buf" ) ;
75+ #lamellar:: serialize_into( buf, self ) . expect( "can serialize and enough space in buf" ) ;
7676 }
7777 fn serialize( & self ) ->Vec <u8 >{
78- #lamellar:: serialize( self , true ) . expect( "can serialize" )
78+ #lamellar:: serialize( self ) . expect( "can serialize" )
7979 }
8080 }
8181 }
@@ -90,13 +90,13 @@ fn impl_return_lamellar_serde_trait(
9090 quote ! {
9191 impl #impl_generics #lamellar:: active_messaging:: LamellarSerde for #am_name #ty_generics #where_clause {
9292 fn serialized_size( & self ) ->usize {
93- #lamellar:: serialized_size( & self . val, true )
93+ #lamellar:: serialized_size( & self . val)
9494 }
9595 fn serialize_into( & self , buf: & mut [ u8 ] ) {
96- #lamellar:: serialize_into( buf, & self . val, true ) . expect( "can serialize and enough space in buf" ) ;
96+ #lamellar:: serialize_into( buf, & self . val) . expect( "can serialize and enough space in buf" ) ;
9797 }
9898 fn serialize( & self ) ->Vec <u8 >{
99- #lamellar:: serialize( self , true ) . expect( "can serialize" )
99+ #lamellar:: serialize( self ) . expect( "can serialize" )
100100 }
101101 }
102102 }
@@ -113,11 +113,11 @@ pub(crate) fn impl_lamellar_result_serde_trait(
113113 impl #impl_generics #lamellar:: active_messaging:: LamellarResultSerde for #am_name #ty_generics #where_clause {
114114 fn serialized_result_size( & self , result: & Box <dyn std:: any:: Any + Sync + Send >) ->usize {
115115 let result = result. downcast_ref:: <#ret_type>( ) . expect( "can downcast result box" ) ;
116- #lamellar:: serialized_size( result, true )
116+ #lamellar:: serialized_size( result)
117117 }
118118 fn serialize_result_into( & self , buf: & mut [ u8 ] , result: & Box <dyn std:: any:: Any + Sync + Send >) {
119119 let result = result. downcast_ref:: <#ret_type>( ) . expect( "can downcast result box" ) ;
120- #lamellar:: serialize_into( buf, result, true ) . expect( "can serialize and enough size in buf" ) ;
120+ #lamellar:: serialize_into( buf, result) . expect( "can serialize and enough size in buf" ) ;
121121 }
122122 }
123123 }
@@ -157,7 +157,7 @@ fn impl_unpack_and_register_function(
157157 let am_name_unpack = quote:: format_ident!( "{}_unpack" , am_name. clone( ) ) ;
158158 quote ! {
159159 fn #am_name_unpack #impl_generics ( bytes: & [ u8 ] , cur_pe: Result <usize , #lamellar:: IdError >) -> std:: sync:: Arc <dyn #lamellar:: active_messaging:: RemoteActiveMessage + Sync + Send > {
160- let __lamellar_data: std:: sync:: Arc <#am_name #ty_generics> = std:: sync:: Arc :: new( #lamellar:: deserialize( & bytes, true ) . expect( "can deserialize into remote active message" ) ) ;
160+ let __lamellar_data: std:: sync:: Arc <#am_name #ty_generics> = std:: sync:: Arc :: new( #lamellar:: deserialize( & bytes) . expect( "can deserialize into remote active message" ) ) ;
161161 <#am_name #ty_generics as #lamellar:: active_messaging:: DarcSerde >:: des( & __lamellar_data, cur_pe) ;
162162 __lamellar_data
163163 }
@@ -252,7 +252,7 @@ fn gen_am_body(
252252 let mut stmts = exec_fn. stmts ;
253253
254254 let ( ret_statement, bytes_buf) = if let Some ( stmt) = stmts. pop ( ) {
255- gen_return_stmt ( am_type, & stmt, & ret_struct_name, & lamellar, local)
255+ gen_return_stmt ( am_type, & stmt, ret_struct_name, lamellar, local)
256256 } else {
257257 (
258258 quote ! { #lamellar:: active_messaging:: LamellarReturn :: Unit } ,
@@ -283,7 +283,7 @@ fn gen_return_stmt(
283283 #lamellar:: active_messaging:: LamellarReturn :: Unit
284284 } ,
285285 AmType :: ReturnData ( ref ret) => {
286- let last_expr = get_expr ( & last_stmt)
286+ let last_expr = get_expr ( last_stmt)
287287 . expect ( "failed to get exec return value (try removing the last \" ;\" )" ) ;
288288 let last_expr =
289289 quote_spanned ! { last_stmt. span( ) => let __lamellar_last_expr: #ret = #last_expr; } ;
@@ -318,7 +318,7 @@ fn gen_return_stmt(
318318 }
319319 }
320320 AmType :: ReturnAm ( ret, _) => {
321- let last_expr = get_expr ( & last_stmt)
321+ let last_expr = get_expr ( last_stmt)
322322 . expect ( "failed to get exec return value (try removing the last \" ;\" )" ) ;
323323 let last_expr =
324324 quote_spanned ! { last_stmt. span( ) => let __lamellar_last_expr: #ret = #last_expr; } ;
@@ -406,7 +406,7 @@ pub(crate) fn generate_am(
406406
407407 let generics = input. generics . clone ( ) ;
408408
409- let ( am_body, bytes_buf) = gen_am_body ( & input, & am_type, & return_struct_name, & lamellar, local) ;
409+ let ( am_body, bytes_buf) = gen_am_body ( input, & am_type, & return_struct_name, lamellar, local) ;
410410
411411 let ( return_type, return_struct) = {
412412 match am_type {
@@ -415,10 +415,10 @@ pub(crate) fn generate_am(
415415 let return_type = quote ! { #output} ;
416416 let return_struct = impl_return_struct (
417417 & generics,
418- & am_data_header,
418+ am_data_header,
419419 & return_struct_name,
420420 & return_type,
421- & lamellar,
421+ lamellar,
422422 bytes_buf,
423423 local,
424424 ) ;
@@ -429,10 +429,10 @@ pub(crate) fn generate_am(
429429 } ;
430430
431431 let lamellar_active_message =
432- impl_lamellar_active_message_trait ( & generics, & orig_name, & am_body, & lamellar) ;
433- let local_am = impl_local_am_trait ( & generics, & orig_name, & return_type, & lamellar) ;
432+ impl_lamellar_active_message_trait ( & generics, & orig_name, & am_body, lamellar) ;
433+ let local_am = impl_local_am_trait ( & generics, & orig_name, & return_type, lamellar) ;
434434 let remote_trait_impls =
435- impl_remote_traits ( & generics, & orig_name, & return_type, & lamellar, local) ;
435+ impl_remote_traits ( & generics, & orig_name, & return_type, lamellar, local) ;
436436
437437 let expanded = quote_spanned ! { am_body. span( ) =>
438438 #lamellar_active_message
@@ -467,6 +467,7 @@ pub(crate) fn generate_am(
467467 }
468468}
469469
470+ #[ allow( clippy:: too_many_arguments) ]
470471pub ( crate ) fn create_am_struct (
471472 generics : & syn:: Generics ,
472473 attributes : & proc_macro2:: TokenStream ,
0 commit comments