From b9e93923a9edacbcca3e83360926abc05ff18af0 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Wed, 27 Nov 2024 15:07:00 -0800 Subject: [PATCH] merged_tree: avoid two unnecessary clones --- lib/src/merged_tree.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/merged_tree.rs b/lib/src/merged_tree.rs index 52c06c40a4..b785e3057c 100644 --- a/lib/src/merged_tree.rs +++ b/lib/src/merged_tree.rs @@ -211,7 +211,7 @@ impl MergedTree { } _ => { 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 })) @@ -961,7 +961,7 @@ impl<'matcher> TreeDiffStreamImpl<'matcher> { .await?; builder.build() } else { - Merge::resolved(Tree::empty(store, dir.clone())) + Merge::resolved(Tree::empty(store, dir)) }; Ok(MergedTree { trees }) }