fn parse_ids(&mut self, file: &Path, contents: &str, errors: &mut bool) {
if self.ids.is_empty() {
with_attrs_in_source(contents, " id", |fragment, i, _| {
- let frag = fragment.trim_left_matches("#").to_owned();
+ let frag = fragment.trim_start_matches("#").to_owned();
let encoded = small_url_encode(&frag);
if !self.ids.insert(frag) {
*errors = true;
Some(i) => i,
None => continue,
};
- if rest[..pos_equals].trim_left_matches(" ") != "" {
+ if rest[..pos_equals].trim_start_matches(" ") != "" {
continue;
}
};
let quote_delim = rest.as_bytes()[pos_quote] as char;
- if rest[..pos_quote].trim_left_matches(" ") != "" {
+ if rest[..pos_quote].trim_start_matches(" ") != "" {
continue;
}
let rest = &rest[pos_quote + 1..];
}
let mut parts = line.split(',');
- let level = match parts.next().map(|l| l.trim().trim_left_matches('(')) {
+ let level = match parts.next().map(|l| l.trim().trim_start_matches('(')) {
Some("active") => Status::Unstable,
Some("removed") => Status::Removed,
Some("accepted") => Status::Stable,