Replace deprecated trim_left_matches by trim_start_matches;

This commit is contained in:
Benjamin Bouvier
2019-01-03 15:10:25 +01:00
committed by Dan Gohman
parent 7e42966c68
commit 813810008b

View File

@@ -9,7 +9,7 @@ pub fn match_directive<'a>(comment: &'a str, directive: &str) -> Option<&'a str>
directive.ends_with(':'),
"Directive must include trailing colon"
);
let text = comment.trim_left_matches(';').trim_start();
let text = comment.trim_start_matches(';').trim_start();
if text.starts_with(directive) {
Some(text[directive.len()..].trim())
} else {