ok/jj
1
0
Fork 0
forked from mirrors/jj

tree: make MergedTreeVal::to_merge() public

I don't think there's any harm in this function being public. We have
a duplicate of it at Google.
This commit is contained in:
Martin von Zweigbergk 2024-05-22 08:37:21 -07:00 committed by Martin von Zweigbergk
parent ff4ea73ac0
commit aecee1d6cc

View file

@ -56,7 +56,8 @@ pub enum MergedTreeVal<'a> {
}
impl MergedTreeVal<'_> {
fn to_merge(&self) -> MergedTreeValue {
/// Converts to an owned value.
pub fn to_merge(&self) -> MergedTreeValue {
match self {
MergedTreeVal::Resolved(value) => Merge::resolved(value.cloned()),
MergedTreeVal::Conflict(merge) => merge.clone(),