浏览代码

"cannot find type `MenuHash` in this scope" (#2240)

Jonathan Dizdarevic 4 年之前
父节点
当前提交
226414d1a5
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 5 0
      .changes/menuhash-fix.md
  2. 1 1
      core/tauri-runtime-wry/src/menu.rs

+ 5 - 0
.changes/menuhash-fix.md

@@ -0,0 +1,5 @@
+---
+"tauri-runtime-wry": patch
+---
+
+Fix the error "cannot find type MenuHash in this scope"

+ 1 - 1
core/tauri-runtime-wry/src/menu.rs

@@ -31,7 +31,7 @@ pub use wry::application::platform::macos::{
 #[cfg(feature = "system-tray")]
 use crate::{Error, Message, Result, TrayMessage};
 
-#[cfg(feature = "menu")]
+#[cfg(any(feature = "menu", feature = "system-tray"))]
 use tauri_runtime::menu::MenuHash;
 
 use uuid::Uuid;