Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix double borrow in synchronous tests that take AppContext

Max Brunsfeld66499f60ee94
diff --git a/crates/gpui2_macros/src/test.rs b/crates/gpui2_macros/src/test.rs
index acaaee597ba..05d2c1f63aa 100644
--- a/crates/gpui2_macros/src/test.rs
+++ b/crates/gpui2_macros/src/test.rs
@@ -175,6 +175,7 @@ pub fn test(args: TokenStream, function: TokenStream) -> TokenStream {
inner_fn_args.extend(quote!(&mut #cx_varname_lock,));
cx_teardowns.extend(quote!(
#cx_varname_lock.quit();
+ drop(#cx_varname_lock);
dispatcher.run_until_parked();
));
continue;