Skip to content

Commit

Permalink
async/client: return a impl Future on execute()
Browse files Browse the repository at this point in the history
  • Loading branch information
nickelc authored and seanmonstar committed Feb 21, 2019
1 parent cd0e4b3 commit 4fba983
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/async_impl/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,12 @@ impl Client {
///
/// This method fails if there was an error while sending request,
/// redirect loop was detected or redirect limit was exhausted.
pub fn execute(&self, request: Request) -> Pending {
pub fn execute(&self, request: Request) -> impl Future<Item = Response, Error = ::Error> {
self.execute_request(request)
}


fn execute_request(&self, req: Request) -> Pending {
pub(super) fn execute_request(&self, req: Request) -> Pending {
let (
method,
url,
Expand Down
2 changes: 1 addition & 1 deletion src/async_impl/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ impl RequestBuilder {
/// ```
pub fn send(self) -> impl Future<Item = Response, Error = ::Error> {
match self.request {
Ok(req) => self.client.execute(req),
Ok(req) => self.client.execute_request(req),
Err(err) => Pending::new_err(err),
}
}
Expand Down

0 comments on commit 4fba983

Please sign in to comment.