We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e17b02d commit 5c33c3eCopy full SHA for 5c33c3e
src/tools/tidy/src/features.rs
@@ -186,9 +186,11 @@ fn test_find_attr_val() {
186
}
187
188
fn test_filen_gate(filen_underscore: &str, features: &mut Features) -> bool {
189
- if filen_underscore.starts_with("feature_gate") {
+ let prefix = "feature_gate_";
190
+ if filen_underscore.starts_with(prefix) {
191
for (n, f) in features.iter_mut() {
- if filen_underscore == format!("feature_gate_{}", n) {
192
+ // Equivalent to filen_underscore == format!("feature_gate_{}", n)
193
+ if &filen_underscore[prefix.len()..] == n {
194
f.has_gate_test = true;
195
return true;
196
0 commit comments