mirror of
https://github.com/OMGeeky/tarpc.git
synced 2026-01-02 01:20:10 +01:00
Fix clippy warnings
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -533,6 +533,7 @@ struct Resp<F, R> {
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[allow(clippy::enum_variant_names)]
|
||||
enum RespState {
|
||||
PollResp,
|
||||
PollReady,
|
||||
|
||||
Reference in New Issue
Block a user