fix(tui): allow dead_code on the macOS-only display-refresh source variant

DisplayRefreshSource::MacosCoreGraphics is only constructed inside
probe_inner()'s #[cfg(target_os = "macos")] branch, so non-macOS builds
compile that construction site out entirely and the variant reads as
dead code under -D warnings. Failed CI's Lint job plus three other
Linux/Windows jobs (Mobile runtime smoke, npm wrapper smoke windows,
Test windows) on the exact commit just pushed to main, all with the
identical "variant `MacosCoreGraphics` is never constructed" error.
This commit is contained in:
Hunter B
2026-07-23 23:53:14 -07:00
parent 705b79eb07
commit 34f00b1398
+3
View File
@@ -22,6 +22,9 @@ pub const MAX_ANIMATION_HZ: u32 = 30;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum DisplayRefreshSource {
None,
// Only constructed inside `#[cfg(target_os = "macos")]` in `probe_inner`
// below; non-macOS builds never build a value of this variant.
#[cfg_attr(not(target_os = "macos"), allow(dead_code))]
MacosCoreGraphics,
EnvOverride,
}