浏览代码

fix ios build of desktop

Jonathan Kelley 1 年之前
父节点
当前提交
8679656d16
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 1 0
      packages/desktop/src/menubar.rs
  2. 3 3
      packages/desktop/src/mobile_shortcut.rs

+ 1 - 0
packages/desktop/src/menubar.rs

@@ -1,5 +1,6 @@
 use tao::window::Window;
 
+#[allow(unused)]
 pub fn build_menu(window: &Window, default_menu_bar: bool) {
     if default_menu_bar {
         #[cfg(not(any(target_os = "ios", target_os = "android")))]

+ 3 - 3
packages/desktop/src/mobile_shortcut.rs

@@ -37,15 +37,15 @@ impl GlobalHotKeyManager {
         Ok(Self())
     }
 
-    pub fn register(&mut self, accelerator: HotKey) -> Result<HotKey, HotkeyError> {
+    pub fn register(&self, accelerator: HotKey) -> Result<HotKey, HotkeyError> {
         Ok(HotKey)
     }
 
-    pub fn unregister(&mut self, id: HotKey) -> Result<(), HotkeyError> {
+    pub fn unregister(&self, id: HotKey) -> Result<(), HotkeyError> {
         Ok(())
     }
 
-    pub fn unregister_all(&mut self, _: &[HotKey]) -> Result<(), HotkeyError> {
+    pub fn unregister_all(&self, _: &[HotKey]) -> Result<(), HotkeyError> {
         Ok(())
     }
 }