diff --git a/crates/project/src/buffer_store.rs b/crates/project/src/buffer_store.rs index 8b65caca7e2c2eed048128bf6570cbaec154858b..9faf80b7ac00002c005df3a3b1e0674dcdd4cc81 100644 --- a/crates/project/src/buffer_store.rs +++ b/crates/project/src/buffer_store.rs @@ -86,11 +86,6 @@ enum OpenBuffer { pub enum BufferStoreEvent { BufferAdded(Entity), - // TODO(jk): this event seems unused - BufferOpened { - buffer: Entity, - project_path: ProjectPath, - }, SharedBufferClosed(proto::PeerId, BufferId), BufferDropped(BufferId), BufferChangedFilePath { @@ -853,11 +848,6 @@ impl BufferStore { cx: &mut Context, ) -> Task>> { if let Some(buffer) = self.get_by_path(&project_path) { - cx.emit(BufferStoreEvent::BufferOpened { - buffer: buffer.clone(), - project_path, - }); - return Task::ready(Ok(buffer)); } @@ -882,16 +872,11 @@ impl BufferStore { // todo(lw): hot foreground spawn cx.spawn(async move |this, cx| { let load_result = load_buffer.await; - this.update(cx, |this, cx| { + this.update(cx, |this, _cx| { // Record the fact that the buffer is no longer loading. this.loading_buffers.remove(&project_path); let buffer = load_result.map_err(Arc::new)?; - cx.emit(BufferStoreEvent::BufferOpened { - buffer: buffer.clone(), - project_path, - }); - Ok(buffer) })? }) diff --git a/crates/project/src/git_store.rs b/crates/project/src/git_store.rs index 70b29635d59cf6b631848f54e8282510d160ac1c..b9d6f72d532609775ccc8b8d426cf278a390cdc2 100644 --- a/crates/project/src/git_store.rs +++ b/crates/project/src/git_store.rs @@ -1615,7 +1615,6 @@ impl GitStore { .detach(); } } - _ => {} } }