mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-26 06:01:48 +00:00
merged_tree: avoid two unnecessary clones
This commit is contained in:
parent
bf17067861
commit
b9e93923a9
1 changed files with 2 additions and 2 deletions
|
@ -211,7 +211,7 @@ impl MergedTree {
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let subdir = self.dir().join(name);
|
let subdir = self.dir().join(name);
|
||||||
Ok(Tree::empty(self.store().clone(), subdir.clone()))
|
Ok(Tree::empty(self.store().clone(), subdir))
|
||||||
}
|
}
|
||||||
})?;
|
})?;
|
||||||
Ok(Some(MergedTree { trees }))
|
Ok(Some(MergedTree { trees }))
|
||||||
|
@ -961,7 +961,7 @@ impl<'matcher> TreeDiffStreamImpl<'matcher> {
|
||||||
.await?;
|
.await?;
|
||||||
builder.build()
|
builder.build()
|
||||||
} else {
|
} else {
|
||||||
Merge::resolved(Tree::empty(store, dir.clone()))
|
Merge::resolved(Tree::empty(store, dir))
|
||||||
};
|
};
|
||||||
Ok(MergedTree { trees })
|
Ok(MergedTree { trees })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue