Fixup warnings
This commit is contained in:
parent
60825d9bef
commit
d52650a55c
@ -16,7 +16,8 @@ use crate::{Client, RUNTIME};
|
|||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
config: tokio_postgres::Config,
|
config: tokio_postgres::Config,
|
||||||
executor: Option<Arc<Executor<Box<Future<Item = (), Error = ()> + Send>>>>,
|
#[allow(clippy::type_complexity)]
|
||||||
|
executor: Option<Arc<dyn Executor<Box<dyn Future<Item = (), Error = ()> + Send>>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Debug for Config {
|
impl fmt::Debug for Config {
|
||||||
@ -118,7 +119,7 @@ impl Config {
|
|||||||
|
|
||||||
pub fn executor<E>(&mut self, executor: E) -> &mut Config
|
pub fn executor<E>(&mut self, executor: E) -> &mut Config
|
||||||
where
|
where
|
||||||
E: Executor<Box<Future<Item = (), Error = ()> + Send>> + 'static + Sync + Send,
|
E: Executor<Box<dyn Future<Item = (), Error = ()> + Send>> + 'static + Sync + Send,
|
||||||
{
|
{
|
||||||
self.executor = Some(Arc::new(executor));
|
self.executor = Some(Arc::new(executor));
|
||||||
self
|
self
|
||||||
@ -149,7 +150,7 @@ impl Config {
|
|||||||
|
|
||||||
fn with_executor<F, T>(&self, f: F) -> T
|
fn with_executor<F, T>(&self, f: F) -> T
|
||||||
where
|
where
|
||||||
F: FnOnce(&Executor<Box<Future<Item = (), Error = ()> + Send>>) -> T,
|
F: FnOnce(&dyn Executor<Box<dyn Future<Item = (), Error = ()> + Send>>) -> T,
|
||||||
{
|
{
|
||||||
match &self.executor {
|
match &self.executor {
|
||||||
Some(e) => f(&**e),
|
Some(e) => f(&**e),
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![warn(clippy::all, rust_2018_idioms)]
|
||||||
|
|
||||||
#[cfg(feature = "runtime")]
|
#[cfg(feature = "runtime")]
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
#[cfg(feature = "runtime")]
|
#[cfg(feature = "runtime")]
|
||||||
|
Loading…
Reference in New Issue
Block a user