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.