From 93125cbd1639140251e7b03c61a146b7023c120d Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 24 Jan 2022 16:14:30 +0100 Subject: [PATCH] Remove `executor::Foreground::Test` All code paths have already transitioned to `Foreground::Deterministic`. --- crates/gpui/src/executor.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/crates/gpui/src/executor.rs b/crates/gpui/src/executor.rs index 84efd2c6e0b6b3ee9d81736821b27f581a460e10..e939008bb301cadde693dfb419514e6663a21117 100644 --- a/crates/gpui/src/executor.rs +++ b/crates/gpui/src/executor.rs @@ -33,7 +33,6 @@ pub enum Foreground { dispatcher: Arc, _not_send_or_sync: PhantomData>, }, - Test(smol::LocalExecutor<'static>), Deterministic(Arc), } @@ -438,10 +437,6 @@ impl Foreground { } } - pub fn test() -> Self { - Self::Test(smol::LocalExecutor::new()) - } - pub fn spawn(&self, future: impl Future + 'static) -> Task { let future = any_local_future(future); let any_task = match self { @@ -460,7 +455,6 @@ impl Foreground { } spawn_inner(future, dispatcher) } - Self::Test(executor) => executor.spawn(future), }; Task::local(any_task) } @@ -470,7 +464,6 @@ impl Foreground { let any_value = match self { Self::Deterministic(executor) => executor.run(future), Self::Platform { .. } => panic!("you can't call run on a platform foreground executor"), - Self::Test(executor) => smol::block_on(executor.run(future)), }; *any_value.downcast().unwrap() }