Fix tidy for the new syntax of feature declarations in libsyntax.
This commit is contained in:
parent
ef1de519ff
commit
11f1eb0c4e
1 changed files with 7 additions and 7 deletions
|
@ -136,18 +136,18 @@ fn collect_lang_features(path: &Path) -> Vec<Feature> {
|
|||
|
||||
let mut features = Vec::new();
|
||||
for line in contents.lines().map(|l| l.trim()) {
|
||||
if !STATUSES.iter().any(|s| line.contains(s) && line.starts_with("(")) {
|
||||
if !STATUSES.iter().any(|s| line.starts_with(&format!("({}", s))) {
|
||||
continue
|
||||
}
|
||||
let mut parts = line.split(",");
|
||||
let name = parts.next().unwrap().replace("\"", "").replace("(", "");
|
||||
let since = parts.next().unwrap().trim().replace("\"", "");
|
||||
let status = match parts.skip(1).next().unwrap() {
|
||||
s if s.contains("Active") => "unstable",
|
||||
s if s.contains("Removed") => "unstable",
|
||||
s if s.contains("Accepted") => "stable",
|
||||
let status = match &parts.next().unwrap().trim().replace("(", "")[..] {
|
||||
"active" => "unstable",
|
||||
"removed" => "unstable",
|
||||
"accepted" => "stable",
|
||||
s => panic!("unknown status: {}", s),
|
||||
};
|
||||
let name = parts.next().unwrap().trim().to_owned();
|
||||
let since = parts.next().unwrap().trim().replace("\"", "");
|
||||
|
||||
features.push(Feature {
|
||||
name: name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue