Skip to content

Commit

Permalink
Fix inner clone
Browse files Browse the repository at this point in the history
  • Loading branch information
LucioFranco committed Feb 2, 2019
1 parent 1f4572b commit cac5779
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ pub type BoxConsulFuture<T, E> = Box<Future<Item = T, Error = Error<E>> + Send>;
/// Currently only the KV api is available, with more to come.
///
/// [consul]: https://www.hashicorp.com/products/consul
#[derive(Clone)]
pub struct Consul<T>
where
T: HttpService<Bytes>,
Expand All @@ -36,6 +35,19 @@ where
inner: Buffer<LiftService<T>, Request<Bytes>>,
}

impl<T> Clone for Consul<T>
where
T: HttpService<Bytes>,
{
fn clone(&self) -> Self {
Consul {
scheme: self.scheme.clone(),
authority: self.authority.clone(),
inner: self.inner.clone(),
}
}
}

/// The future that represents the eventual value
/// returned from the consul request.
pub struct ConsulFuture<T, R>
Expand Down

0 comments on commit cac5779

Please sign in to comment.