/// Remove any mutability qualifiers from a method's argument list
Remove any mutability qualifiers from a method's argument list
Remove any mutability qualifiers from a method ' s argument list
fn demutify(inputs: &Punctuated<FnArg, token::Comma>)
    -> Punctuated<FnArg, token::Comma>
{
    let mut output = inputs.clone();
    for arg in output.iter_mut() {
        match arg {
            FnArg::Receiver(r) => if r.reference.is_none() {
                r.mutability = None
            },
            FnArg::Typed(pt) => demutify_arg(pt),
        }
    }
    output
}
fn demutify ( inputs : & Punctuated < FnArg , token :: Comma > ) -> Punctuated < FnArg , token :: Comma > { let mut output = inputs . clone ( ) ; for arg in output . iter_mut ( ) { match arg { FnArg :: Receiver ( r ) => if r . reference . is_none ( ) { r . mutability = None } , FnArg :: Typed ( pt ) => demutify_arg ( pt ) , } } output }
Remove any mutability qualifiers from a method's argument list
Remove any mutability qualifiers from a method ' s argument list
inputs
&Punctuated<FnArg, token::Comma>