소스 검색

"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;