Auto merge of #14105 - servo:rm-rc, r=nox

Stop unnecessarily wrapping the response argument to http_redirect_fetch in Rc.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14105)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-11-07 11:47:37 -06:00 committed by GitHub
commit 3b5d1f2814

View file

@ -607,7 +607,7 @@ fn http_fetch<UI: 'static + UIProvider>(request: Rc<Request>,
RedirectMode::Follow => {
// set back to default
response.return_internal.set(true);
http_redirect_fetch(request, cache, Rc::new(response),
http_redirect_fetch(request, cache, response,
cors_flag, target, done_chan, context)
}
}
@ -677,7 +677,7 @@ fn http_fetch<UI: 'static + UIProvider>(request: Rc<Request>,
/// [HTTP redirect fetch](https://fetch.spec.whatwg.org#http-redirect-fetch)
fn http_redirect_fetch<UI: 'static + UIProvider>(request: Rc<Request>,
cache: &mut CORSCache,
response: Rc<Response>,
response: Response,
cors_flag: bool,
target: &mut Target,
done_chan: &mut DoneChannel,
@ -688,7 +688,7 @@ fn http_redirect_fetch<UI: 'static + UIProvider>(request: Rc<Request>,
// Step 2
if !response.actual_response().headers.has::<Location>() {
return Rc::try_unwrap(response).ok().unwrap();
return response;
}
// Step 3