File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ use crate::{Client, RUNTIME};
1616#[ derive( Clone ) ]
1717pub 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
2223impl 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) ,
Original file line number Diff line number Diff line change 1+ #![ warn( clippy:: all, rust_2018_idioms) ]
2+
13#[ cfg( feature = "runtime" ) ]
24use lazy_static:: lazy_static;
35#[ cfg( feature = "runtime" ) ]
You can’t perform that action at this time.
0 commit comments