Remove unused CloseBuffer message

This commit is contained in:
Antonio Scandurra 2022-03-08 11:17:20 +01:00
parent d6c8fdb3c4
commit 51d5ed48f0
6 changed files with 0 additions and 47 deletions

View file

@ -201,7 +201,6 @@ impl Project {
client.add_entity_message_handler(Self::handle_add_collaborator);
client.add_entity_message_handler(Self::handle_buffer_reloaded);
client.add_entity_message_handler(Self::handle_buffer_saved);
client.add_entity_message_handler(Self::handle_close_buffer);
client.add_entity_message_handler(Self::handle_disk_based_diagnostics_updated);
client.add_entity_message_handler(Self::handle_disk_based_diagnostics_updating);
client.add_entity_message_handler(Self::handle_remove_collaborator);
@ -3456,16 +3455,6 @@ impl Project {
})
}
async fn handle_close_buffer(
_: ModelHandle<Self>,
_: TypedEnvelope<proto::CloseBuffer>,
_: Arc<Client>,
_: AsyncAppContext,
) -> Result<()> {
// TODO: use this for following
Ok(())
}
async fn handle_buffer_saved(
this: ModelHandle<Self>,
envelope: TypedEnvelope<proto::BufferSaved>,

View file

@ -1415,20 +1415,6 @@ impl language::File for File {
})
}
fn buffer_removed(&self, buffer_id: u64, cx: &mut MutableAppContext) {
self.worktree.update(cx, |worktree, _| {
if let Worktree::Remote(worktree) = worktree {
worktree
.client
.send(proto::CloseBuffer {
project_id: worktree.project_id,
buffer_id,
})
.log_err();
}
});
}
fn as_any(&self) -> &dyn Any {
self
}