diff --git a/lib/src/repo.rs b/lib/src/repo.rs
index 5894ece83d..b1f09022d8 100644
--- a/lib/src/repo.rs
+++ b/lib/src/repo.rs
@@ -885,7 +885,7 @@ impl MutableRepo {
/// Creates a `DescendantRebaser` to rebase descendants of the recorded
/// rewritten and abandoned commits.
// TODO(ilyagr): Inline this. It's only used in tests.
- pub fn create_descendant_rebaser<'settings, 'repo>(
+ fn create_descendant_rebaser<'settings, 'repo>(
&'repo mut self,
settings: &'settings UserSettings,
) -> DescendantRebaser<'settings, 'repo> {
diff --git a/lib/src/rewrite.rs b/lib/src/rewrite.rs
index e179fb29db..d2bccc89be 100644
--- a/lib/src/rewrite.rs
+++ b/lib/src/rewrite.rs
@@ -242,7 +242,7 @@ pub struct RebaseOptions {
}
/// Rebases descendants of a commit onto a new commit (or several).
-pub struct DescendantRebaser<'settings, 'repo> {
+pub(crate) struct DescendantRebaser<'settings, 'repo> {
settings: &'settings UserSettings,
mut_repo: &'repo mut MutableRepo,
// The commit identified by the key has been replaced by all the ones in the value, typically
@@ -521,7 +521,7 @@ impl<'settings, 'repo> DescendantRebaser<'settings, 'repo> {
// TODO: Perhaps change the interface since it's not just about rebasing
// commits.
- pub fn rebase_next(&mut self) -> Result