From aecee1d6cc19698efa7d311e5090b28dc570e725 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Wed, 22 May 2024 08:37:21 -0700 Subject: [PATCH] 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. --- lib/src/merged_tree.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/merged_tree.rs b/lib/src/merged_tree.rs index e9cb5f674..b1b4fe3d5 100644 --- a/lib/src/merged_tree.rs +++ b/lib/src/merged_tree.rs @@ -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(),