clippy fix

This commit is contained in:
Nikita Galaiko 2023-08-30 09:51:57 +02:00 committed by GitButler
parent 51b50ba324
commit f27168304a
2 changed files with 7 additions and 7 deletions

View File

@ -380,7 +380,7 @@ impl App {
fn diff_hunks_to_string(
diff: HashMap<path::PathBuf, Vec<project_repository::diff::Hunk>>,
) -> HashMap<path::PathBuf, String> {
return diff
diff
.into_iter()
.map(|(file_path, hunks)| {
(
@ -392,7 +392,7 @@ impl App {
.join("\n"),
)
})
.collect::<HashMap<_, _>>();
.collect::<HashMap<_, _>>()
}
pub fn git_match_paths(&self, project_id: &str, pattern: &str) -> Result<Vec<String>> {

View File

@ -742,7 +742,7 @@ fn build_wd_tree(
}
let wd_tree_oid = index
.write_tree_to(&gb_repository.git_repository.inner())
.write_tree_to(gb_repository.git_repository.inner())
.with_context(|| "failed to write wd tree".to_string())?;
Ok(wd_tree_oid)
}
@ -842,7 +842,7 @@ fn build_wd_tree_from_repo(
}
let tree_oid = index
.write_tree_to(&gb_repository.git_repository.inner())
.write_tree_to(gb_repository.git_repository.inner())
.context("failed to write tree to repo")?;
Ok(tree_oid)
}
@ -977,7 +977,7 @@ fn build_branches_tree(gb_repository: &Repository) -> Result<git2::Oid> {
}
let tree_oid = index
.write_tree_to(&gb_repository.git_repository.inner())
.write_tree_to(gb_repository.git_repository.inner())
.context("failed to write index to tree")?;
Ok(tree_oid)
@ -1001,7 +1001,7 @@ fn build_log_tree(
}
let tree_oid = index
.write_tree_to(&gb_repository.git_repository.inner())
.write_tree_to(gb_repository.git_repository.inner())
.context("failed to write index to tree")?;
Ok(tree_oid)
@ -1061,7 +1061,7 @@ fn build_session_tree(gb_repository: &Repository) -> Result<git2::Oid> {
}
let tree_oid = index
.write_tree_to(&gb_repository.git_repository.inner())
.write_tree_to(gb_repository.git_repository.inner())
.context("failed to write index to tree")?;
Ok(tree_oid)