pub(crate)ify the async::client module

This commit is contained in:
Sean McArthur
2018-09-11 14:37:50 -07:00
parent 1ded95ce0e
commit 55fcedcf97
2 changed files with 10 additions and 10 deletions

View File

@@ -407,7 +407,7 @@ enum PendingInner {
Error(Option<::Error>),
}
pub struct PendingRequest {
struct PendingRequest {
method: Method,
url: Url,
headers: HeaderMap,
@@ -420,6 +420,13 @@ pub struct PendingRequest {
in_flight: ResponseFuture,
}
impl Pending {
pub(super) fn new_err(err: ::Error) -> Pending {
Pending {
inner: PendingInner::Error(Some(err)),
}
}
}
impl Future for Pending {
type Item = Response;
@@ -551,10 +558,3 @@ fn make_referer(next: &Url, previous: &Url) -> Option<HeaderValue> {
referer.as_str().parse().ok()
}
// pub(crate)
pub fn pending_err(err: ::Error) -> Pending {
Pending {
inner: PendingInner::Error(Some(err)),
}
}