Fix small bugs in gpui2::test

This commit is contained in:
Conrad Irwin 2023-10-26 11:23:07 +02:00
parent 5651ef7ca2
commit 6185c935a6
2 changed files with 3 additions and 3 deletions

View File

@ -7,8 +7,8 @@ use std::{any::Any, future::Future, sync::Arc};
#[derive(Clone)]
pub struct TestAppContext {
pub(crate) app: Arc<Mutex<AppContext>>,
pub(crate) executor: Executor,
pub app: Arc<Mutex<AppContext>>,
pub executor: Executor,
}
impl Context for TestAppContext {

View File

@ -170,7 +170,7 @@ pub fn test(args: TokenStream, function: TokenStream) -> TokenStream {
let mut #cx_varname = gpui2::TestAppContext::new(
dispatcher.clone()
);
let mut #cx_varname_lock = cx_varname.app.lock();
let mut #cx_varname_lock = #cx_varname.app.lock();
));
inner_fn_args.extend(quote!(&mut #cx_varname_lock,));
cx_teardowns.extend(quote!(