From a503f8b3369ff24ce39ccf1a1da0d1d56366dabb Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Wed, 14 Aug 2019 14:10:40 -0700 Subject: [PATCH] fix(client): impl Connect for Box (#1889) --- src/client/connect/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/client/connect/mod.rs b/src/client/connect/mod.rs index 3461493f..d26b0628 100644 --- a/src/client/connect/mod.rs +++ b/src/client/connect/mod.rs @@ -35,6 +35,15 @@ pub trait Connect: Send + Sync { fn connect(&self, dst: Destination) -> Self::Future; } +impl Connect for Box { + type Transport = ::Transport; + type Error = ::Error; + type Future = ::Future; + fn connect(&self, dst: Destination) -> Self::Future { + ::connect(self, dst) + } +} + /// A set of properties to describe where and how to try to connect. /// /// This type is passed an argument for the [`Connect`](Connect) trait.