Thanks to visit codestin.com
Credit goes to github.com

Skip to content

clippy too_many_arguments in #[tarpc_service] #502

@dan-da

Description

@dan-da

After some recent changes in my code I am seeing errors like this:

warning: this function has too many arguments (8/7)                       
   --> src/rpc_server.rs:158:1                                                                                                                       
    |                                                                                                                                                
158 | #[tarpc::service]                                                                                                                              
    | ^^^^^^^^^^^^^^^^^                                                                                                                              
    |                  
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments                               
    = note: `#[warn(clippy::too_many_arguments)]` on by default                                                                                      
    = note: this warning originates in the attribute macro `tarpc::service` (in Nightly builds, run with -Z macro-backtrace for more info)``

If I place a #[allow(clippy::too_many_arguments)] above the #[tarpc::service] the warning still occurs. The only way I've found to silence it is to decorate the entire rpc_server module that contains the tarpc::service, which is not ideal..

I'm not certain but I'm guessing the problem now occurs because I added an additional argument to all RPC methods. Unfortunately removing args is not an option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions