diff --git a/plugins/tests/service.rs b/plugins/tests/service.rs index 8dc5f16..457ae2c 100644 --- a/plugins/tests/service.rs +++ b/plugins/tests/service.rs @@ -41,13 +41,13 @@ fn syntax() { async fn attr(s: String) -> String; async fn no_args_no_return(); async fn no_args() -> (); - async fn one_arg(foo: String) -> i32; - async fn two_args_no_return(bar: String, baz: u64); - async fn two_args(bar: String, baz: u64) -> String; + async fn one_arg(one: String) -> i32; + async fn two_args_no_return(one: String, two: u64); + async fn two_args(one: String, two: u64) -> String; async fn no_args_ret_error() -> i32; - async fn one_arg_ret_error(foo: String) -> String; + async fn one_arg_ret_error(one: String) -> String; async fn no_arg_implicit_return_error(); #[doc = "attr"] - async fn one_arg_implicit_return_error(foo: String); + async fn one_arg_implicit_return_error(one: String); } } diff --git a/tarpc/examples/pubsub.rs b/tarpc/examples/pubsub.rs index f016f5d..c61908f 100644 --- a/tarpc/examples/pubsub.rs +++ b/tarpc/examples/pubsub.rs @@ -132,7 +132,7 @@ impl publisher::Publisher for Publisher { fn unsubscribe(self, _: context::Context, id: u32) -> Self::UnsubscribeFut { eprintln!("Unsubscribing {}", id); let mut clients = self.clients.lock().unwrap(); - if let None = clients.remove(&id) { + if clients.remove(&id).is_none() { eprintln!( "Client {} not found. Existings clients: {:?}", id, &*clients diff --git a/tarpc/src/lib.rs b/tarpc/src/lib.rs index 9422895..383e8e3 100644 --- a/tarpc/src/lib.rs +++ b/tarpc/src/lib.rs @@ -204,6 +204,7 @@ //! Use `cargo doc` as you normally would to see the documentation created for all //! items expanded by a `service!` invocation. #![deny(missing_docs)] +#![allow(clippy::type_complexity)] pub mod rpc; pub use rpc::*; diff --git a/tarpc/src/rpc/context.rs b/tarpc/src/rpc/context.rs index cf8d712..61be471 100644 --- a/tarpc/src/rpc/context.rs +++ b/tarpc/src/rpc/context.rs @@ -42,7 +42,7 @@ pub struct Context { #[cfg(feature = "serde1")] fn ten_seconds_from_now() -> SystemTime { - return SystemTime::now() + Duration::from_secs(10); + SystemTime::now() + Duration::from_secs(10) } /// Returns the context for the current request, or a default Context if no request is active. diff --git a/tarpc/src/rpc/server/mod.rs b/tarpc/src/rpc/server/mod.rs index 880e5e3..3e7f0a9 100644 --- a/tarpc/src/rpc/server/mod.rs +++ b/tarpc/src/rpc/server/mod.rs @@ -533,6 +533,7 @@ struct Resp { } #[derive(Debug)] +#[allow(clippy::enum_variant_names)] enum RespState { PollResp, PollReady,