diff --git a/lib/src/repo.rs b/lib/src/repo.rs index a6a0aba055b..c9b9aa0c294 100644 --- a/lib/src/repo.rs +++ b/lib/src/repo.rs @@ -914,7 +914,7 @@ impl MutableRepo { ) -> Result { let result = self .rebase_descendants_return_rebaser(settings, options)? - .map_or(0, |rebaser| rebaser.rebased().len()); + .map_or(0, |rebaser| rebaser.into_map().len()); self.clear_descendant_rebaser_plans(); Ok(result) } @@ -942,7 +942,7 @@ impl MutableRepo { // enough information to describe the results of a rebase if some commits got // abandoned .rebase_descendants_return_rebaser(settings, options)? - .map_or(HashMap::new(), |rebaser| rebaser.rebased().clone())); + .map_or(HashMap::new(), |rebaser| rebaser.into_map())); self.clear_descendant_rebaser_plans(); result } diff --git a/lib/src/rewrite.rs b/lib/src/rewrite.rs index 64c728470f8..0a786ac9e5b 100644 --- a/lib/src/rewrite.rs +++ b/lib/src/rewrite.rs @@ -381,8 +381,8 @@ impl<'settings, 'repo> DescendantRebaser<'settings, 'repo> { /// Returns a map from `CommitId` of old commit to new commit. Includes the /// commits rebase so far. Does not include the inputs passed to /// `rebase_descendants`. - pub fn rebased(&self) -> &HashMap { - &self.rebased + pub fn into_map(self) -> HashMap { + self.rebased } /// Panics if `parent_mapping` contains cycles