浏览代码

fix clippy errors on macOS

Chip Reed 2 年之前
父节点
当前提交
88dce4429f
共有 1 个文件被更改,包括 9 次插入10 次删除
  1. 9 10
      core/tauri/src/vibrancy/macos.rs

+ 9 - 10
core/tauri/src/vibrancy/macos.rs

@@ -63,9 +63,11 @@ pub fn apply_effects(window: id, effects: WindowEffectsConfig) {
       return;
     }
 
-    if appearance as u32 > 9 && NSAppKitVersionNumber < NSAppKitVersionNumber10_14 {
+    if appearance as u32 > 4 && NSAppKitVersionNumber < NSAppKitVersionNumber10_11 {
       appearance = NSVisualEffectMaterial::AppearanceBased;
-    } else if appearance as u32 > 4 && NSAppKitVersionNumber < NSAppKitVersionNumber10_11 {
+    }
+
+    if appearance as u32 > 9 && NSAppKitVersionNumber < NSAppKitVersionNumber10_14 {
       appearance = NSVisualEffectMaterial::AppearanceBased;
     }
 
@@ -203,18 +205,15 @@ impl NSVisualEffectView for id {
 #[repr(u64)]
 #[derive(Clone, Copy, Debug, PartialEq)]
 pub enum NSVisualEffectMaterial {
-  #[deprecated(
-    since = "macOS 10.14",
-    note = "A default material appropriate for the view's effectiveAppearance.  You should instead choose an appropriate semantic material."
-  )]
+  #[deprecated = "Since macOS 10.14 a default material appropriate for the view's effectiveAppearance. You should instead choose an appropriate semantic material."]
   AppearanceBased = 0,
-  #[deprecated(since = "macOS 10.14", note = "Use a semantic material instead.")]
+  #[deprecated = "Since macOS 10.14 use a semantic material instead."]
   Light = 1,
-  #[deprecated(since = "macOS 10.14", note = "Use a semantic material instead.")]
+  #[deprecated = "Since macOS 10.14 use a semantic material instead."]
   Dark = 2,
-  #[deprecated(since = "macOS 10.14", note = "Use a semantic material instead.")]
+  #[deprecated = "Since macOS 10.14 use a semantic material instead."]
   MediumLight = 8,
-  #[deprecated(since = "macOS 10.14", note = "Use a semantic material instead.")]
+  #[deprecated = "Since macOS 10.14 use a semantic material instead."]
   UltraDark = 9,
 
   /// macOS 10.10+