diff --git a/crates/collab2/src/executor.rs b/crates/collab2/src/executor.rs index 6d33374e55..81d5e977a6 100644 --- a/crates/collab2/src/executor.rs +++ b/crates/collab2/src/executor.rs @@ -36,12 +36,4 @@ impl Executor { } } } - - pub fn record_backtrace(&self) { - match self { - Executor::Production => {} - #[cfg(test)] - Executor::Deterministic(background) => background.record_backtrace(), - } - } } diff --git a/crates/collab2/src/rpc.rs b/crates/collab2/src/rpc.rs index 7e847e8bff..835b48809d 100644 --- a/crates/collab2/src/rpc.rs +++ b/crates/collab2/src/rpc.rs @@ -110,7 +110,7 @@ struct Session { peer: Arc, connection_pool: Arc>, live_kit_client: Option>, - executor: Executor, + _executor: Executor, } impl Session { @@ -612,7 +612,7 @@ impl Server { peer: this.peer.clone(), connection_pool: this.connection_pool.clone(), live_kit_client: this.app_state.live_kit_client.clone(), - executor: executor.clone(), + _executor: executor.clone() }; update_user_contacts(user_id, &session).await?; @@ -1723,7 +1723,6 @@ async fn update_language_server( request: proto::UpdateLanguageServer, session: Session, ) -> Result<()> { - session.executor.record_backtrace(); let project_id = ProjectId::from_proto(request.project_id); let project_connection_ids = session .db() @@ -1750,7 +1749,6 @@ async fn forward_project_request( where T: EntityMessage + RequestMessage, { - session.executor.record_backtrace(); let project_id = ProjectId::from_proto(request.remote_entity_id()); let host_connection_id = { let collaborators = session @@ -1778,7 +1776,6 @@ async fn create_buffer_for_peer( request: proto::CreateBufferForPeer, session: Session, ) -> Result<()> { - session.executor.record_backtrace(); let peer_id = request.peer_id.ok_or_else(|| anyhow!("invalid peer id"))?; session .peer @@ -1791,7 +1788,6 @@ async fn update_buffer( response: Response, session: Session, ) -> Result<()> { - session.executor.record_backtrace(); let project_id = ProjectId::from_proto(request.project_id); let mut guest_connection_ids; let mut host_connection_id = None; @@ -1812,7 +1808,6 @@ async fn update_buffer( } let host_connection_id = host_connection_id.ok_or_else(|| anyhow!("host not found"))?; - session.executor.record_backtrace(); broadcast( Some(session.connection_id), guest_connection_ids, diff --git a/crates/gpui2/src/executor.rs b/crates/gpui2/src/executor.rs index 4523af4aaf..4e434da8cc 100644 --- a/crates/gpui2/src/executor.rs +++ b/crates/gpui2/src/executor.rs @@ -222,11 +222,6 @@ impl BackgroundExecutor { self.dispatcher.as_test().unwrap().allow_parking(); } - #[cfg(any(test, feature = "test-support"))] - pub fn record_backtrace(&self) { - self.dispatcher.as_test().unwrap().record_backtrace(); - } - #[cfg(any(test, feature = "test-support"))] pub fn rng(&self) -> StdRng { self.dispatcher.as_test().unwrap().rng() diff --git a/crates/gpui2/src/platform/test/dispatcher.rs b/crates/gpui2/src/platform/test/dispatcher.rs index 01dcc9409b..258c484063 100644 --- a/crates/gpui2/src/platform/test/dispatcher.rs +++ b/crates/gpui2/src/platform/test/dispatcher.rs @@ -128,12 +128,8 @@ impl TestDispatcher { }) } - pub fn record_backtrace(&self) { - todo!("record_backtrace") - } - pub fn rng(&self) -> StdRng { - todo!("rng") + self.state.lock().random.clone() } }