浏览代码

pass clippy

Evan Almloff 2 年之前
父节点
当前提交
70590c6af0
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      packages/desktop/src/desktop_context.rs

+ 5 - 3
packages/desktop/src/desktop_context.rs

@@ -342,10 +342,12 @@ impl WindowEventHandlers {
 
 struct WryWindowEventHandlerInner {
     window_id: WindowId,
-    handler:
-        Box<dyn FnMut(&Event<UserWindowEvent>, &EventLoopWindowTarget<UserWindowEvent>) + 'static>,
+    handler: WryEventHandlerCallback,
 }
 
+type WryEventHandlerCallback =
+    Box<dyn FnMut(&Event<UserWindowEvent>, &EventLoopWindowTarget<UserWindowEvent>) + 'static>;
+
 impl WryWindowEventHandlerInner {
     fn apply_event(
         &mut self,
@@ -381,7 +383,7 @@ pub fn use_wry_event_handler(
         let id = desktop.create_wry_event_handler(handler);
 
         WryEventHandler {
-            handlers: desktop.event_handlers.clone(),
+            handlers: desktop.event_handlers,
             id,
         }
     })