update str::from_utf8

This commit is contained in:
Sean McArthur
2014-12-23 12:55:53 -08:00
parent 33f61213ce
commit 691c70a380
9 changed files with 20 additions and 18 deletions

View File

@@ -24,7 +24,7 @@ impl Header for SetCookie {
let mut set_cookies = Vec::with_capacity(raw.len());
for set_cookies_raw in raw.iter() {
match from_utf8(set_cookies_raw[]) {
Some(s) if !s.is_empty() => {
Ok(s) if !s.is_empty() => {
match from_str(s) {
Some(cookie) => set_cookies.push(cookie),
None => ()