Skip to content

Commit d52650a

Browse files
committed
Fixup warnings
1 parent 60825d9 commit d52650a

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

postgres/src/config.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ use crate::{Client, RUNTIME};
1616
#[derive(Clone)]
1717
pub struct Config {
1818
config: tokio_postgres::Config,
19-
executor: Option<Arc<Executor<Box<Future<Item = (), Error = ()> + Send>>>>,
19+
#[allow(clippy::type_complexity)]
20+
executor: Option<Arc<dyn Executor<Box<dyn Future<Item = (), Error = ()> + Send>>>>,
2021
}
2122

2223
impl fmt::Debug for Config {
@@ -118,7 +119,7 @@ impl Config {
118119

119120
pub fn executor<E>(&mut self, executor: E) -> &mut Config
120121
where
121-
E: Executor<Box<Future<Item = (), Error = ()> + Send>> + 'static + Sync + Send,
122+
E: Executor<Box<dyn Future<Item = (), Error = ()> + Send>> + 'static + Sync + Send,
122123
{
123124
self.executor = Some(Arc::new(executor));
124125
self
@@ -149,7 +150,7 @@ impl Config {
149150

150151
fn with_executor<F, T>(&self, f: F) -> T
151152
where
152-
F: FnOnce(&Executor<Box<Future<Item = (), Error = ()> + Send>>) -> T,
153+
F: FnOnce(&dyn Executor<Box<dyn Future<Item = (), Error = ()> + Send>>) -> T,
153154
{
154155
match &self.executor {
155156
Some(e) => f(&**e),

postgres/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![warn(clippy::all, rust_2018_idioms)]
2+
13
#[cfg(feature = "runtime")]
24
use lazy_static::lazy_static;
35
#[cfg(feature = "runtime")]

0 commit comments

Comments
 (0)