more concise

This commit is contained in:
Naveen Gattu 2021-11-29 06:59:30 -08:00 committed by GitHub
parent 733019e029
commit 94ea422404
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -844,13 +844,11 @@ pub fn http_fetch(
.ok() .ok()
}); });
// Substep 4. // Substep 4.
if let Some(ref mut location) = location { if let Some(Ok(ref mut location)) = location {
if let Ok(ref mut location) = location { if location.fragment().is_none() {
if location.fragment().is_none() { let current_url = request.current_url();
let current_url = request.current_url(); location.set_fragment(current_url.fragment());
location.set_fragment(current_url.fragment());
}
} }
} }
response.actual_response_mut().location_url = location; response.actual_response_mut().location_url = location;