Files
Unlucky-Launcher/crates
AskaEth 150243e0b6 fix(core): listing() 与唯一调用点同 gate #[cfg(windows)],消掉 Linux 上的 dead_code
CI 的 clippy (ubuntu-latest) 退出码 101 的唯一首因:
  error: function `listing` is never used
   --> crates/core/tests/adopt/surface_cases.rs:147:4
  note: `-D dead-code` implied by `-D warnings`

`listing()` 的 4 处调用(43/65/69/73 行)全部落在 `#[cfg(windows)]` 的
`a_junction_on_the_instances_dir_must_not_write_into_the_game_root` 里,helper 本身没 gate
⇒ Linux 上调用点整块编掉,helper 变死代码;Windows 上跑不出来(本地一直绿的原因)。

最小改法:只给 helper 加 `#[cfg(windows)]`,与调用点对齐(同仓既有写法见
tests/launch/watchdog_cases.rs 的 `chatty_lines()`)。不删用例、不改断言、不给整个 mod 加
cfg、不用 #[allow(dead_code)] 静音。

验证:Linux 容器 ull-linux-check:bookworm 上 cargo clippy --workspace --all-targets
-- -D warnings;Windows 上 cargo clippy -p unlucky-core --all-targets -- -D warnings
且 adopt 测试清单仍有那条 junction 用例(4 处调用仍在编)。
2026-11-11 22:57:43 +08:00
..