From cadb44d8f4ebf3f74c3d17ad9f1cf6c1c123807e Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Thu, 24 Jan 2019 15:48:49 -0800 Subject: [PATCH] fix(client): impl Connect for Box --- 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 3461493f56..d26b0628b4 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.