Merge pull request #6235 from dotCooCoo/fix/prefs-dialog-cfg-clippy

Preferences: the settings filter builds without a clippy warning on macOS
This commit is contained in:
BFlat
2026-11-09 05:41:36 +08:00
committed by GitHub
+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 =