From d52650a55c2703d45e0aa3a44c46cab8df780961 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 24 Mar 2019 13:32:29 -0700 Subject: [PATCH] Fixup warnings --- postgres/src/config.rs | 7 ++++--- postgres/src/lib.rs | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/postgres/src/config.rs b/postgres/src/config.rs index 5982e4fc..ccfb5f4c 100644 --- a/postgres/src/config.rs +++ b/postgres/src/config.rs @@ -16,7 +16,8 @@ use crate::{Client, RUNTIME}; #[derive(Clone)] pub struct Config { config: tokio_postgres::Config, - executor: Option + Send>>>>, + #[allow(clippy::type_complexity)] + executor: Option + Send>>>>, } impl fmt::Debug for Config { @@ -118,7 +119,7 @@ impl Config { pub fn executor(&mut self, executor: E) -> &mut Config where - E: Executor + Send>> + 'static + Sync + Send, + E: Executor + Send>> + 'static + Sync + Send, { self.executor = Some(Arc::new(executor)); self @@ -149,7 +150,7 @@ impl Config { fn with_executor(&self, f: F) -> T where - F: FnOnce(&Executor + Send>>) -> T, + F: FnOnce(&dyn Executor + Send>>) -> T, { match &self.executor { Some(e) => f(&**e), diff --git a/postgres/src/lib.rs b/postgres/src/lib.rs index f2f84f67..c4a1ae5f 100644 --- a/postgres/src/lib.rs +++ b/postgres/src/lib.rs @@ -1,3 +1,5 @@ +#![warn(clippy::all, rust_2018_idioms)] + #[cfg(feature = "runtime")] use lazy_static::lazy_static; #[cfg(feature = "runtime")]