mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-28 02:21:12 +00:00
conflicts: avoid unnecessary cloning of conflict content
This commit is contained in:
parent
777b786c53
commit
b3946be414
@ -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…
x
Reference in New Issue
Block a user