fn build_inner(item: &ItemFn) -> Result<(bool, TokenStream), TokenStream> {
    let block = &item.block;

    let Signature {
        asyncness,
        unsafety,
        generics,
        output,
        inputs,
        ..
    } = &item.sig;

    // The custom attributes need to be removed be I rebuild the function
    let new_inputs: Punctuated<FnArg, syn::Token![,]> = clean_inputs(inputs)?;

    let Generics {
        params,
        where_clause,
        ..
    } = generics;

    Ok((
        asyncness.is_some(),
        quote::quote! {
            #[inline(always)]
            #unsafety #asyncness fn inner #params ( #new_inputs ) #output #where_clause #block
        },
    ))
}
// Rebuilt the original function to be placed in wrapper function's body
Rebuilt the original function to be placed in wrapper function's body
Rebuilt the original function to be placed in wrapper function ' s body
fn build_inner(item: &ItemFn) -> Result<(bool, TokenStream), TokenStream> {
    let block = &item.block;
    let Signature {
        asyncness,
        unsafety,
        generics,
        output,
        inputs,
        ..
    } = &item.sig;
    // The custom attributes need to be removed be I rebuild the function
    let new_inputs: Punctuated<FnArg, syn::Token![,]> = clean_inputs(inputs)?;
    let Generics {
        params,
        where_clause,
        ..
    } = generics;
    Ok((
        asyncness.is_some(),
        quote::quote! {
            #[inline(always)]
            #unsafety #asyncness fn inner #params ( #new_inputs ) #output #where_clause #block
        },
    ))
}
fn build_inner ( item : & ItemFn ) -> Result < ( bool , TokenStream ) , TokenStream > { let block = & item . block ; let Signature { asyncness , unsafety , generics , output , inputs , .. } = & item . sig ; // The custom attributes need to be removed be I rebuild the function let new_inputs : Punctuated < FnArg , syn :: Token ! [ ] > = clean_inputs ( inputs ) ? ; let Generics { params , where_clause , .. } = generics ; Ok ( ( asyncness . is_some ( ) , quote :: quote ! { [ inline ( always ) ] unsafety asyncness fn inner params ( new_inputs ) output where_clause block } , ) ) }
Rebuilt the original function to be placed in wrapper function's body
Rebuilt the original function to be placed in wrapper function ' s body
item
&ItemFn
item
&ItemFn