into_string to to_string, from_str to parse

This commit is contained in:
Sean McArthur
2014-12-23 13:09:58 -08:00
parent 691c70a380
commit 79fc40cbce
13 changed files with 42 additions and 42 deletions

View File

@@ -36,7 +36,7 @@ impl Header for Accept {
match from_utf8(mimes_raw.as_slice()) {
Ok(mimes_str) => {
for mime_str in mimes_str.split(',') {
match from_str(mime_str.trim()) {
match mime_str.trim().parse() {
Some(mime) => mimes.push(mime),
None => return None
}