mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 19:02:07 +00:00
Fixed randomized test failures
co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
d8dac07408
commit
ab952f1b31
1 changed files with 6 additions and 6 deletions
|
@ -1673,12 +1673,12 @@ impl LocalSnapshot {
|
||||||
|
|
||||||
let mut updated_repositories: Vec<proto::RepositoryEntry> = Vec::new();
|
let mut updated_repositories: Vec<proto::RepositoryEntry> = Vec::new();
|
||||||
let mut removed_repositories = Vec::new();
|
let mut removed_repositories = Vec::new();
|
||||||
let mut self_repos = self.snapshot.repository_entries.values().peekable();
|
let mut self_repos = self.snapshot.repository_entries.iter().peekable();
|
||||||
let mut other_repos = other.snapshot.repository_entries.values().peekable();
|
let mut other_repos = other.snapshot.repository_entries.iter().peekable();
|
||||||
loop {
|
loop {
|
||||||
match (self_repos.peek(), other_repos.peek()) {
|
match (self_repos.peek(), other_repos.peek()) {
|
||||||
(Some(self_repo), Some(other_repo)) => {
|
(Some((self_work_dir, self_repo)), Some((other_work_dir, other_repo))) => {
|
||||||
match Ord::cmp(&self_repo.work_directory, &other_repo.work_directory) {
|
match Ord::cmp(self_work_dir, other_work_dir) {
|
||||||
Ordering::Less => {
|
Ordering::Less => {
|
||||||
updated_repositories.push((*self_repo).into());
|
updated_repositories.push((*self_repo).into());
|
||||||
self_repos.next();
|
self_repos.next();
|
||||||
|
@ -1697,11 +1697,11 @@ impl LocalSnapshot {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(Some(self_repo), None) => {
|
(Some((_, self_repo)), None) => {
|
||||||
updated_repositories.push((*self_repo).into());
|
updated_repositories.push((*self_repo).into());
|
||||||
self_repos.next();
|
self_repos.next();
|
||||||
}
|
}
|
||||||
(None, Some(other_repo)) => {
|
(None, Some((_, other_repo))) => {
|
||||||
removed_repositories.push(other_repo.work_directory.to_proto());
|
removed_repositories.push(other_repo.work_directory.to_proto());
|
||||||
other_repos.next();
|
other_repos.next();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue