Make Response::url_list be a bare Vec<ServoUrl>

This commit is contained in:
Anthony Ramine 2017-04-02 12:50:02 +02:00
parent 28f1f669bc
commit 7b16021a89
5 changed files with 29 additions and 20 deletions

View file

@ -418,7 +418,7 @@ fn test_fetch_response_is_opaque_filtered() {
assert_eq!(fetch_response.response_type, ResponseType::Opaque);
assert!(fetch_response.url().is_none());
assert!(fetch_response.url_list.into_inner().len() == 0);
assert!(fetch_response.url_list.is_empty());
// this also asserts that status message is "the empty byte sequence"
assert!(fetch_response.status.is_none());
assert_eq!(fetch_response.headers, Headers::new());

View file

@ -896,8 +896,7 @@ fn test_load_succeeds_with_a_redirect_loop() {
let _ = server_b.close();
let response = response.to_actual();
assert_eq!(*response.url_list.borrow(),
[url_a.clone(), url_b, url_a]);
assert_eq!(response.url_list, [url_a.clone(), url_b, url_a]);
assert_eq!(*response.body.lock().unwrap(),
ResponseBody::Done(b"Success".to_vec()));
}