Use str::parse() rather than FromStr::from_str.

The former appears to be preferred.
This commit is contained in:
Ms2ger 2015-06-10 14:36:36 +02:00
parent 3ece6bc166
commit b49bd79625
5 changed files with 10 additions and 17 deletions

View file

@ -184,7 +184,7 @@ impl Request {
}
// Step 2
if self.context != Context::Fetch && !self.headers.has::<AcceptLanguage>() {
self.headers.set(AcceptLanguage(vec![qitem(Language::from_str("en-US").unwrap())]));
self.headers.set(AcceptLanguage(vec![qitem("en-US".parse().unwrap())]));
}
// TODO: Figure out what a Priority object is
// Step 3