소스 검색

fix clippy

Evan Almloff 1 년 전
부모
커밋
f8a8ee3e29
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      packages/desktop/src/hooks.rs
  2. 1 1
      packages/fullstack/src/hooks/server_future.rs

+ 1 - 1
packages/desktop/src/hooks.rs

@@ -58,7 +58,7 @@ pub fn use_global_shortcut(
     handler: impl FnMut() + 'static,
 ) -> Result<ShortcutHandle, ShortcutRegistryError> {
     // wrap the user's handler in something that will carry the scope/runtime with it
-    let mut cb = use_callback(handler);
+    let cb = use_callback(handler);
 
     use_hook_with_cleanup(
         move || window().create_shortcut(accelerator.accelerator(), move || cb.call()),

+ 1 - 1
packages/fullstack/src/hooks/server_future.rs

@@ -9,7 +9,7 @@ where
     T: Serialize + DeserializeOwned + 'static,
     F: Future<Output = T> + 'static,
 {
-    let mut cb = use_callback(_future);
+    let cb = use_callback(_future);
     let mut first_run = use_hook(|| CopyValue::new(true));
 
     let resource = use_resource(move || {