From ea9c5b06863cd502ec129d8465f0ac3521d5114d Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Sat, 22 Jan 2022 15:21:33 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/project/src/project.rs | 2 +- crates/project/src/worktree.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs index b540d9713a..56db25365e 100644 --- a/crates/project/src/project.rs +++ b/crates/project/src/project.rs @@ -2428,7 +2428,7 @@ mod tests { .as_remote_mut() .unwrap() .snapshot - .apply_update(update_message) + .apply_remote_update(update_message) .unwrap(); assert_eq!( diff --git a/crates/project/src/worktree.rs b/crates/project/src/worktree.rs index 3c7e12d1c9..32e72a5f17 100644 --- a/crates/project/src/worktree.rs +++ b/crates/project/src/worktree.rs @@ -265,7 +265,7 @@ impl Worktree { .spawn(async move { while let Some(update) = updates_rx.recv().await { let mut snapshot = snapshot_tx.borrow().clone(); - if let Err(error) = snapshot.apply_update(update) { + if let Err(error) = snapshot.apply_remote_update(update) { log::error!("error applying worktree update: {}", error); } *snapshot_tx.borrow_mut() = snapshot; @@ -1000,7 +1000,7 @@ impl Snapshot { } } - pub(crate) fn apply_update(&mut self, update: proto::UpdateWorktree) -> Result<()> { + pub(crate) fn apply_remote_update(&mut self, update: proto::UpdateWorktree) -> Result<()> { let mut entries_by_path_edits = Vec::new(); let mut entries_by_id_edits = Vec::new(); for entry_id in update.removed_entries { @@ -2618,7 +2618,7 @@ mod tests { let update = scanner .snapshot() .build_update(&prev_snapshot, 0, 0, include_ignored); - prev_snapshot.apply_update(update).unwrap(); + prev_snapshot.apply_remote_update(update).unwrap(); assert_eq!( prev_snapshot.to_vec(true), scanner.snapshot().to_vec(include_ignored)