From bfa43d16f95c3c13cd3fb423c452114ac34b7834 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Fri, 29 Mar 2024 23:33:48 -0700 Subject: [PATCH] rewrite: don't collect set of heads to add unnecessarily --- lib/src/rewrite.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/src/rewrite.rs b/lib/src/rewrite.rs index 0f7d8b5a3..fb41264a8 100644 --- a/lib/src/rewrite.rs +++ b/lib/src/rewrite.rs @@ -493,11 +493,10 @@ impl<'settings, 'repo> DescendantRebaser<'settings, 'repo> { let heads_to_add_expression = old_commits_expression .parents() .minus(&old_commits_expression); - let heads_to_add: HashSet<_> = heads_to_add_expression + let heads_to_add = heads_to_add_expression .evaluate_programmatic(self.mut_repo) .unwrap() - .iter() - .collect(); + .iter(); let mut view = self.mut_repo.view().store_view().clone(); for commit_id in self.mut_repo.parent_mapping.keys() {