Skip to content

Commit

Permalink
Merge pull request hyperium#217 from Detegr/master
Browse files Browse the repository at this point in the history
Changed deprecated trim_chars to trim_matches
  • Loading branch information
seanmonstar committed Dec 31, 2014
2 parents 719418b + 05ddfd1 commit 6b9c14d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/header/common/cache_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 6b9c14d

Please sign in to comment.