Skip to content

Commit 5c81ae7

Browse files
committed
feat: simplify sub-spawn code
1 parent 62665ac commit 5c81ae7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

crates/bitwarden-threading/src/thread_bound_runner.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ where
6262
spawn_local(async move {
6363
let state = Rc::new(state);
6464
while let Some(request) = call_channel_rx.recv().await {
65-
let state = state.clone();
66-
spawn_local(async move {
67-
(request.function)(state).await;
68-
});
65+
spawn_local((request.function)(state.clone()));
6966
}
7067
});
7168

0 commit comments

Comments
 (0)