Returns LoadResponse struct instead of a tuple

Still boxes the reader, but at least is a step in the right direction
This commit is contained in:
Sam Gibson 2015-08-16 12:41:35 +10:00
parent 3c756d254b
commit 879b058be2
2 changed files with 19 additions and 8 deletions

View file

@ -495,8 +495,8 @@ fn test_load_follows_a_redirect() {
match load::<MockRequest>(load_data, resource_mgr, None, &Factory) {
Err(_) => panic!("expected to follow a redirect"),
Ok((mut r, _)) => {
let response = read_response(&mut *r);
Ok(mut lr) => {
let response = read_response(&mut *lr.reader);
assert_eq!(response, "Yay!".to_string());
}
}