From adfbbf21b2267eef6e7f6deeb39731e8e7133e27 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Wed, 10 May 2023 20:09:37 -0700 Subject: [PATCH] fmt --- crates/collab/src/db.rs | 13 +++++++++---- .../src/tests/randomized_integration_tests.rs | 12 ++++++++---- crates/fs/src/repository.rs | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/crates/collab/src/db.rs b/crates/collab/src/db.rs index cac84a0ccc..b95bb49b4e 100644 --- a/crates/collab/src/db.rs +++ b/crates/collab/src/db.rs @@ -1606,11 +1606,16 @@ impl Database { while let Some(db_status_entry) = db_repository_statuses.next().await { let db_status_entry = db_status_entry?; if db_status_entry.is_deleted { - repository.removed_worktree_repo_paths.push(db_status_entry.repo_path); + repository + .removed_worktree_repo_paths + .push(db_status_entry.repo_path); } else { - repository.updated_worktree_statuses.push(proto::StatusEntry { - repo_path: db_status_entry.repo_path, status: db_status_entry.status as i32 - }); + repository + .updated_worktree_statuses + .push(proto::StatusEntry { + repo_path: db_status_entry.repo_path, + status: db_status_entry.status as i32, + }); } } } diff --git a/crates/collab/src/tests/randomized_integration_tests.rs b/crates/collab/src/tests/randomized_integration_tests.rs index d5ed47675a..fe4b6190ed 100644 --- a/crates/collab/src/tests/randomized_integration_tests.rs +++ b/crates/collab/src/tests/randomized_integration_tests.rs @@ -14,6 +14,7 @@ use gpui::{executor::Deterministic, ModelHandle, Task, TestAppContext}; use language::{range_to_lsp, FakeLspAdapter, Language, LanguageConfig, PointUtf16}; use lsp::FakeLanguageServer; use parking_lot::Mutex; +use pretty_assertions::assert_eq; use project::{search::SearchQuery, Project, ProjectPath}; use rand::{ distributions::{Alphanumeric, DistString}, @@ -32,7 +33,6 @@ use std::{ }, }; use util::ResultExt; -use pretty_assertions::assert_eq; lazy_static::lazy_static! { static ref PLAN_LOAD_PATH: Option = path_env_var("LOAD_PLAN"); @@ -828,7 +828,8 @@ async fn apply_client_operation( let dot_git_dir = repo_path.join(".git"); - let statuses = statuses.iter() + let statuses = statuses + .iter() .map(|(path, val)| (path.as_path(), val.clone())) .collect::>(); @@ -836,8 +837,11 @@ async fn apply_client_operation( client.fs.create_dir(&dot_git_dir).await?; } - client.fs.set_status_for_repo(&dot_git_dir, statuses.as_slice()).await; - }, + client + .fs + .set_status_for_repo(&dot_git_dir, statuses.as_slice()) + .await; + } }, } Ok(()) diff --git a/crates/fs/src/repository.rs b/crates/fs/src/repository.rs index 6bf0a43230..2fe31f5569 100644 --- a/crates/fs/src/repository.rs +++ b/crates/fs/src/repository.rs @@ -1,7 +1,7 @@ use anyhow::Result; use collections::HashMap; use parking_lot::Mutex; -use serde_derive::{Serialize, Deserialize}; +use serde_derive::{Deserialize, Serialize}; use std::{ ffi::OsStr, os::unix::prelude::OsStrExt,