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:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user