Preferences: the settings filter builds without a clippy warning on macOS

Squashed from #6235 onto main.
This commit is contained in:
dotCooCoo
2026-11-09 04:19:35 +07:00
committed by bflatastic
parent 1e21154e4d
commit ef65f0fed4
+4 -2
View File
@@ -57,10 +57,12 @@ pub(crate) struct Setting {
/// preferences, each category's in the order the dialog lists them.
fn settings() -> impl Iterator<Item = Setting> {
let ui_fields = UI_FIELDS.iter().map(|&(key, category, label)| Setting { key, category, section: "", label });
const SYSTEM_TITLE_BAR: bool = cfg!(all(not(target_arch = "wasm32"), not(target_os = "macos")));
const DISPLAY_SERVER_CHOICE: bool = cfg!(target_os = "linux");
let shown = |key: &str| match key {
"systemTitleBar" => cfg!(all(not(target_arch = "wasm32"), not(target_os = "macos"))),
"systemTitleBar" => SYSTEM_TITLE_BAR,
"appTitleBar" => APP_TITLE_BAR_SHOWN,
"linuxDisplayServer" => cfg!(target_os = "linux"),
"linuxDisplayServer" => DISPLAY_SERVER_CHOICE,
_ => true,
};
let prefs =