소스 검색

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,
         }
     })