diff --git a/crates/collab2/src/executor.rs b/crates/collab2/src/executor.rs index 6d33374e55bb3c62b5ec6eb83428301747fdbb03..81d5e977a6f13da2df7d6110012a6cf66d45a0b8 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 7e847e8bffd21c202733f2028bf03337d6d768d3..835b48809da94dc60cd872d473e564a7456da81e 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 4523af4aaf8254d9829895551b04acad5ee78b4f..4e434da8cc781dc84b255554e12556d7bc582241 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 01dcc9409bf1291d43159a4ebeec4e38295b3101..258c484063c534afca163ac3cec99ef3d00a43a9 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() } }