Replaced deprecated reference to trim_chars with trim_matches

This commit is contained in:
Alexandru Bordei
2014-12-31 00:10:01 +02:00
parent 719418b7d8
commit 1ea4131317

View File

@@ -109,7 +109,7 @@ impl FromStr for CacheDirective {
"proxy-revalidate" => Some(ProxyRevalidate),
"" => None,
_ => match s.find('=') {
Some(idx) if idx+1 < s.len() => match (s[..idx], s[idx+1..].trim_chars('"')) {
Some(idx) if idx+1 < s.len() => match (s[..idx], s[idx+1..].trim_matches('"')) {
("max-age" , secs) => secs.parse().map(MaxAge),
("max-stale", secs) => secs.parse().map(MaxStale),
("min-fresh", secs) => secs.parse().map(MinFresh),