mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-26 14:06:13 +00:00
rewrite: remove redundant commit_id.clone() from merge_commit_trees*()
This commit is contained in:
parent
ed1c07e73e
commit
dac04960f0
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ pub fn merge_commit_trees_without_repo(
|
|||
.map(|commit| commit.id().clone())
|
||||
.collect_vec();
|
||||
for (i, other_commit) in commits.iter().enumerate().skip(1) {
|
||||
let ancestor_ids = index.common_ancestors(&commit_ids[0..i], &[commit_ids[i].clone()]);
|
||||
let ancestor_ids = index.common_ancestors(&commit_ids[0..i], &commit_ids[i..][..1]);
|
||||
let ancestors: Vec<_> = ancestor_ids
|
||||
.iter()
|
||||
.map(|id| store.get_commit(id))
|
||||
|
|
Loading…
Reference in a new issue