Skip to content

Commit

Permalink
src: require Clone for HttpClient
Browse files Browse the repository at this point in the history
This was largely already the case, just not enforced.

Fixes: http-rs#46
Refs: http-rs/surf#237
  • Loading branch information
Fishrock123 committed Sep 22, 2020
1 parent 3cfd120 commit 1b2da7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hyper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::io;
use std::str::FromStr;

/// Hyper-based HTTP Client.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct HyperClient {}

impl HyperClient {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub use http_types;
/// though middleware for one of its own requests, and in order to do so should be wrapped in an
/// `Rc`/`Arc` to enable reference cloning.
#[async_trait]
pub trait HttpClient: std::fmt::Debug + Unpin + Send + Sync + 'static {
pub trait HttpClient: Clone + std::fmt::Debug + Unpin + Send + Sync + 'static {
/// Perform a request.
async fn send(&self, req: Request) -> Result<Response, Error>;
}
Expand Down

0 comments on commit 1b2da7c

Please sign in to comment.