Skip to content

Commit f41b8f6

Browse files
Remove ignore_to_bool function
1 parent a82b879 commit f41b8f6

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/librustdoc/doctest.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,14 +1227,6 @@ impl IndividualTestOptions {
12271227
}
12281228
}
12291229

1230-
fn ignore_to_bool(ignore: &Ignore, target_str: &str) -> bool {
1231-
match ignore {
1232-
Ignore::All => true,
1233-
Ignore::None => false,
1234-
Ignore::Some(ref ignores) => ignores.iter().any(|s| target_str.contains(s)),
1235-
}
1236-
}
1237-
12381230
pub(crate) trait Tester {
12391231
fn add_test(&mut self, test: String, config: LangString, line: usize);
12401232
fn get_line(&self) -> usize {
@@ -1500,7 +1492,11 @@ impl Tester for Collector {
15001492
Arc::clone(&self.rustdoc_test_options),
15011493
test_id,
15021494
);
1503-
doctest.ignore = ignore_to_bool(&doctest.lang_string.ignore, &target_str);
1495+
doctest.ignore = match doctest.lang_string.ignore {
1496+
Ignore::All => true,
1497+
Ignore::None => false,
1498+
Ignore::Some(ref ignores) => ignores.iter().any(|s| target_str.contains(s)),
1499+
};
15041500
self.tests.add_doctest(
15051501
doctest,
15061502
&opts,

0 commit comments

Comments
 (0)