client: Remove unused FakeServer::build_user_store method (#55444)
This PR removes the `build_user_store` method from the `FakeServer`, as it was not used anywhere. Release Notes: - N/A
This commit is contained in:
1 parent
e66fdeb8ad
commit
d6cf164a72
1 file changed
+2
-21
@@ -7,17 +7,16 @@ use cloud_api_client::{
|
||||
};
|
||||
use cloud_llm_client::{CurrentUsage, UsageData, UsageLimit};
|
||||
use futures::{StreamExt, stream::BoxStream};
|
||||
use gpui::{AppContext as _, Entity, TestAppContext};
|
||||
use gpui::{AppContext as _, TestAppContext};
|
||||
use http_client::{AsyncBody, Method, Request, http};
|
||||
use parking_lot::Mutex;
|
||||
use rpc::{ConnectionId, Peer, Receipt, TypedEnvelope, proto};
|
||||
|
||||
use crate::{Client, Connection, Credentials, EstablishConnectionError, UserStore};
|
||||
use crate::{Client, Connection, Credentials, EstablishConnectionError};
|
||||
|
||||
pub struct FakeServer {
|
||||
peer: Arc<Peer>,
|
||||
state: Arc<Mutex<FakeServerState>>,
|
||||
user_id: u64,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
@@ -38,7 +37,6 @@ impl FakeServer {
|
||||
let server = Self {
|
||||
peer: Peer::new(0),
|
||||
state: Default::default(),
|
||||
user_id: client_user_id,
|
||||
};
|
||||
|
||||
client.http_client().as_fake().replace_handler({
|
||||
@@ -213,23 +211,6 @@ impl FakeServer {
|
||||
fn connection_id(&self) -> ConnectionId {
|
||||
self.state.lock().connection_id.expect("not connected")
|
||||
}
|
||||
|
||||
pub async fn build_user_store(
|
||||
&self,
|
||||
client: Arc<Client>,
|
||||
cx: &mut TestAppContext,
|
||||
) -> Entity<UserStore> {
|
||||
let user_store = cx.new(|cx| UserStore::new(client, cx));
|
||||
assert_eq!(
|
||||
self.receive::<proto::GetUsers>()
|
||||
.await
|
||||
.unwrap()
|
||||
.payload
|
||||
.user_ids,
|
||||
&[self.user_id]
|
||||
);
|
||||
user_store
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for FakeServer {
|
||||
|
||||
Reference in new issue
Block a user