Remove unused pending_updates field from RemoteWorktree

This commit is contained in:
Max Brunsfeld 2022-02-23 16:59:39 -08:00
parent e9009d4edf
commit 6060077444
2 changed files with 1 additions and 13 deletions

View file

@ -7,7 +7,7 @@ use ::ignore::gitignore::{Gitignore, GitignoreBuilder};
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Context, Result};
use client::{proto, Client, TypedEnvelope}; use client::{proto, Client, TypedEnvelope};
use clock::ReplicaId; use clock::ReplicaId;
use collections::{HashMap, VecDeque}; use collections::HashMap;
use futures::{ use futures::{
channel::mpsc::{self, UnboundedSender}, channel::mpsc::{self, UnboundedSender},
Stream, StreamExt, Stream, StreamExt,
@ -84,7 +84,6 @@ pub struct RemoteWorktree {
queued_operations: Vec<(u64, Operation)>, queued_operations: Vec<(u64, Operation)>,
diagnostic_summaries: TreeMap<PathKey, DiagnosticSummary>, diagnostic_summaries: TreeMap<PathKey, DiagnosticSummary>,
weak: bool, weak: bool,
pending_updates: VecDeque<proto::UpdateWorktree>,
} }
#[derive(Clone)] #[derive(Clone)]
@ -238,7 +237,6 @@ impl Worktree {
}), }),
), ),
weak, weak,
pending_updates: Default::default(),
}) })
}); });
@ -857,10 +855,6 @@ impl RemoteWorktree {
Ok(()) Ok(())
} }
pub fn has_pending_updates(&self) -> bool {
!self.pending_updates.is_empty()
}
pub fn update_diagnostic_summary( pub fn update_diagnostic_summary(
&mut self, &mut self,
path: Arc<Path>, path: Arc<Path>,

View file

@ -4380,12 +4380,6 @@ mod tests {
.worktrees(cx) .worktrees(cx)
.map(|worktree| { .map(|worktree| {
let worktree = worktree.read(cx); let worktree = worktree.read(cx);
assert!(
!worktree.as_remote().unwrap().has_pending_updates(),
"Guest {} worktree {:?} contains deferred updates",
guest_id,
worktree.id()
);
(worktree.id(), worktree.snapshot()) (worktree.id(), worktree.snapshot())
}) })
.collect::<BTreeMap<_, _>>() .collect::<BTreeMap<_, _>>()