Changed match condition to use as_str() due to change in the header name

type.
This commit is contained in:
Cliff H 2017-01-06 08:35:06 -05:00
parent 3a569f6230
commit 2b5ec6240f
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ fn test_root() {
assert!(response.body().is_none());
assert_eq!(response.status(), Status::SeeOther);
for h in response.headers() {
match h.name.as_ref() {
match h.name.as_str() {
"Location" => assert_eq!(h.value, "/login"),
"Content-Length" => assert_eq!(h.value.parse::<i32>().unwrap(), 0),
_ => { /* let these through */ }