mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-01 20:45:57 +03:00
clippy fix
This commit is contained in:
parent
51b50ba324
commit
f27168304a
@ -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>> {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user