base red: acpmux's login-env watcher test module is Linux-only, so macOS has no unused import (clippy, after #33406)

Merged
LA
3d ago
+2-2

Fixes the macOS half of the clippy (changed cmux-tui packages) red from #33406 (3534e7b7bcf): error: unused import: super::* at acpmux/src/login_env/watch.rs:229 in the acpmux lib test build on macOS. The Linux half (unused import: notify::Watcher) was fixed by #33664 while this PR was open; this PR now has only the macOS fix.

Takes back #33406: only the test module's cfg changes; no code changes.

Cause

The test module's one test is Linux-only (#[cfg(target_os = "linux")]), so the macOS test build has an empty mod tests whose use super::*; is unused, and clippy -D warnings refuses it.

Fix

The test module gets #[cfg(all(test, target_os = "linux"))], and the cfg on its one test moves to the module. No test is lost on any OS.

Red at the base, green at the head

Command (fleet): cmux-ci run --class isolated --script scripts/ci/cmux-tui-rust-check.sh --arg clippy --os macos --ref SHA

Changelog

none

Observed / Not run

Observed: the clippy steps above; rustfmt --check passed.
Not run: the Linux test itself (its cfg only moved; CI runs it).