mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 02:46:43 +00:00
💄
This commit is contained in:
parent
506ce8e032
commit
ea9c5b0686
2 changed files with 4 additions and 4 deletions
|
@ -2428,7 +2428,7 @@ mod tests {
|
|||
.as_remote_mut()
|
||||
.unwrap()
|
||||
.snapshot
|
||||
.apply_update(update_message)
|
||||
.apply_remote_update(update_message)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue