Skip to content

Commit ab1d58f

Browse files
committed
---
yaml --- r: 277408 b: refs/heads/try c: 11f1eb0 h: refs/heads/master
1 parent bafd7a0 commit ab1d58f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: ef1de519ff286a21e220d5839a6a5d468d296773
4+
refs/heads/try: 11f1eb0c4e2ff7e43052b4b847fb4dffaeea46b7
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/tools/tidy/src/features.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,18 @@ fn collect_lang_features(path: &Path) -> Vec<Feature> {
136136

137137
let mut features = Vec::new();
138138
for line in contents.lines().map(|l| l.trim()) {
139-
if !STATUSES.iter().any(|s| line.contains(s) && line.starts_with("(")) {
139+
if !STATUSES.iter().any(|s| line.starts_with(&format!("({}", s))) {
140140
continue
141141
}
142142
let mut parts = line.split(",");
143-
let name = parts.next().unwrap().replace("\"", "").replace("(", "");
144-
let since = parts.next().unwrap().trim().replace("\"", "");
145-
let status = match parts.skip(1).next().unwrap() {
146-
s if s.contains("Active") => "unstable",
147-
s if s.contains("Removed") => "unstable",
148-
s if s.contains("Accepted") => "stable",
143+
let status = match &parts.next().unwrap().trim().replace("(", "")[..] {
144+
"active" => "unstable",
145+
"removed" => "unstable",
146+
"accepted" => "stable",
149147
s => panic!("unknown status: {}", s),
150148
};
149+
let name = parts.next().unwrap().trim().to_owned();
150+
let since = parts.next().unwrap().trim().replace("\"", "");
151151

152152
features.push(Feature {
153153
name: name,

0 commit comments

Comments
 (0)