Skip to content

Commit 7858beb

Browse files
committed
Remove needless is_not_nightly closure.
1 parent 0264a36 commit 7858beb

File tree

1 file changed

+4
-4
lines changed
  • crates/cargo-test-macro/src

1 file changed

+4
-4
lines changed

crates/cargo-test-macro/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,27 @@ pub fn cargo_test(attr: TokenStream, item: TokenStream) -> TokenStream {
2121
let mut ignore = false;
2222
let mut requires_reason = false;
2323
let mut found_reason = false;
24-
let is_not_nightly = || !version().1;
24+
let is_not_nightly = !version().1;
2525
for rule in split_rules(attr) {
2626
match rule.as_str() {
2727
"build_std_real" => {
2828
// Only run the "real" build-std tests on nightly and with an
2929
// explicit opt-in (these generally only work on linux, and
3030
// have some extra requirements, and are slow, and can pollute
3131
// the environment since it downloads dependencies).
32-
ignore |= is_not_nightly();
32+
ignore |= is_not_nightly;
3333
ignore |= option_env!("CARGO_RUN_BUILD_STD_TESTS").is_none();
3434
}
3535
"build_std_mock" => {
3636
// Only run the "mock" build-std tests on nightly and disable
3737
// for windows-gnu which is missing object files (see
3838
// https://github.com/rust-lang/wg-cargo-std-aware/issues/46).
39-
ignore |= is_not_nightly();
39+
ignore |= is_not_nightly;
4040
ignore |= cfg!(all(target_os = "windows", target_env = "gnu"));
4141
}
4242
"nightly" => {
4343
requires_reason = true;
44-
ignore |= is_not_nightly();
44+
ignore |= is_not_nightly;
4545
}
4646
s if s.starts_with("requires_") => {
4747
let command = &s[9..];

0 commit comments

Comments
 (0)