Skip to content

Commit b7559d3

Browse files
Biagio Festasdroege
authored andcommitted
glib-macros/async_test: dont move main context within closure
1 parent 135a83d commit b7559d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

glib-macros/src/async_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub(crate) fn async_test(_args: TokenStream, mut item: TokenStream) -> TokenStre
3434
item_fn.block = syn::parse2(quote::quote! {
3535
{
3636
let main_ctx = glib::MainContext::new();
37-
main_ctx.with_thread_default(move || main_ctx.block_on(async #body))
37+
main_ctx.with_thread_default(|| main_ctx.block_on(async #body))
3838
.expect("cannot set thread default main context for test")
3939
}
4040
})

0 commit comments

Comments
 (0)