diff --git a/crates/proto/Cargo.toml b/crates/proto/Cargo.toml index 9af37d9eb2..5cb898d7fb 100644 --- a/crates/proto/Cargo.toml +++ b/crates/proto/Cargo.toml @@ -18,7 +18,6 @@ doctest = false [dependencies] anyhow.workspace = true -collections.workspace = true prost.workspace = true serde.workspace = true diff --git a/crates/proto/src/proto.rs b/crates/proto/src/proto.rs index 13c5229ec3..d3384ea120 100644 --- a/crates/proto/src/proto.rs +++ b/crates/proto/src/proto.rs @@ -7,7 +7,6 @@ mod typed_envelope; pub use error::*; pub use typed_envelope::*; -use collections::HashMap; pub use prost::{DecodeError, Message}; use serde::Serialize; use std::{ @@ -746,16 +745,10 @@ pub const MAX_WORKTREE_UPDATE_MAX_CHUNK_SIZE: usize = 2; pub const MAX_WORKTREE_UPDATE_MAX_CHUNK_SIZE: usize = 256; pub fn split_worktree_update(mut message: UpdateWorktree) -> impl Iterator { - let mut done_files = false; - - let mut repository_map = message - .updated_repositories - .into_iter() - .map(|repo| (repo.work_directory_id, repo)) - .collect::>(); + let mut done = false; iter::from_fn(move || { - if done_files { + if done { return None; } @@ -777,28 +770,45 @@ pub fn split_worktree_update(mut message: UpdateWorktree) -> impl Iterator impl Iterator