Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clippy too_many_arguments in #[tarpc_service] #502

Open
dan-da opened this issue Jan 18, 2025 · 0 comments
Open

clippy too_many_arguments in #[tarpc_service] #502

dan-da opened this issue Jan 18, 2025 · 0 comments

Comments

@dan-da
Copy link

dan-da commented Jan 18, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant