Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Tidy up branch
Conrad Irwind2afc97b5326
diff --git a/crates/collab/src/db/queries/rooms.rs b/crates/collab/src/db/queries/rooms.rsindex af554955a1d..878f0d67cfa 100644--- a/crates/collab/src/db/queries/rooms.rs+++ b/crates/collab/src/db/queries/rooms.rs@@ -156,8 +156,6 @@ impl Database {initial_project_id: Option<ProjectId>,) -> Result<RoomGuard<(proto::Room, proto::IncomingCall)>> {self.room_transaction(room_id, |tx| async move {- let room = self.get_room(room_id, &tx).await?;-let caller = room_participant::Entity::find().filter(room_participant::Column::UserId@@ -196,6 +194,7 @@ impl Database {.insert(&*tx).await?;+ let room = self.get_room(room_id, &tx).await?;let incoming_call = Self::build_incoming_call(&room, called_user_id).ok_or_else(|| anyhow!("failed to build incoming call"))?;Ok((room, incoming_call))@@ -1172,7 +1171,6 @@ impl Database {}}drop(db_participants);- dbg!(&participants);let mut db_projects = db_room.find_related(project::Entity)diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rsindex 8bb33cae296..835b48809da 100644--- a/crates/collab/src/rpc.rs+++ b/crates/collab/src/rpc.rs@@ -1504,7 +1504,7 @@ async fn join_project(// First, we send the metadata associated with each worktree.response.send(proto::JoinProjectResponse {worktrees: worktrees.clone(),- replica_id: Some(replica_id.0 as u32),+ replica_id: replica_id.0 as u32,collaborators: collaborators.clone(),language_servers: project.language_servers.clone(),})?;diff --git a/crates/project/src/project.rs b/crates/project/src/project.rsindex 8b83dc44557..ad2e1bb2679 100644--- a/crates/project/src/project.rs+++ b/crates/project/src/project.rs@@ -715,8 +715,7 @@ impl Project {}).await?;let this = cx.new_model(|cx| {- // todo!()- let replica_id = response.payload.replica_id.unwrap() as ReplicaId;+ let replica_id = response.payload.replica_id as ReplicaId;let mut worktrees = Vec::new();for worktree in response.payload.worktrees {diff --git a/crates/rpc/proto/zed.proto b/crates/rpc/proto/zed.protoindex 84d03727c0c..e423441a302 100644--- a/crates/rpc/proto/zed.proto+++ b/crates/rpc/proto/zed.proto@@ -369,7 +369,7 @@ message JoinProject {}message JoinProjectResponse {- optional uint32 replica_id = 1;+ uint32 replica_id = 1;repeated WorktreeMetadata worktrees = 2;repeated Collaborator collaborators = 3;repeated LanguageServer language_servers = 4;