Skip to content

Commit 567b07c

Browse files
committed
rename parse_cfg_prefix() to has_cfg_prefix()
The function parse_cfg_prefix() is not really parsing. It's just checking whether the prefix is present or not. So the new function name as suggested by @Mark-Simulacrum is better.
1 parent 1e436eb commit 567b07c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tools/compiletest/src/header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl EarlyProps {
4444
props.ignore =
4545
props.ignore ||
4646
config.parse_cfg_name_directive(ln, "ignore") ||
47-
(config.parse_cfg_prefix(ln, "only") &&
47+
(config.has_cfg_prefix(ln, "only") &&
4848
!config.parse_cfg_name_directive(ln, "only")) ||
4949
ignore_gdb(config, ln) ||
5050
ignore_lldb(config, ln) ||
@@ -566,7 +566,7 @@ impl Config {
566566
}
567567
}
568568

569-
fn parse_cfg_prefix(&self, line: &str, prefix: &str) -> bool {
569+
fn has_cfg_prefix(&self, line: &str, prefix: &str) -> bool {
570570
// returns whether this line contains this prefix or not. For prefix
571571
// "ignore", returns true if line says "ignore-x86_64", "ignore-arch",
572572
// "ignore-andorid" etc.

0 commit comments

Comments
 (0)