mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-28 17:41:14 +00:00
conflicts: avoid unnecessary cloning of conflict content
This commit is contained in:
parent
777b786c53
commit
b3946be414
1 changed files with 4 additions and 4 deletions
|
@ -247,11 +247,11 @@ impl Conflict<Option<TreeValue>> {
|
|||
}
|
||||
}
|
||||
MergeHunk::Conflict(ConflictHunk { removes, adds }) => {
|
||||
for (i, buf) in removes.iter().enumerate() {
|
||||
removed_content[i].extend_from_slice(buf);
|
||||
for (i, buf) in removes.into_iter().enumerate() {
|
||||
removed_content[i].extend(buf);
|
||||
}
|
||||
for (i, buf) in adds.iter().enumerate() {
|
||||
added_content[i].extend_from_slice(buf);
|
||||
for (i, buf) in adds.into_iter().enumerate() {
|
||||
added_content[i].extend(buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue