diff --git a/lib/src/default_index/composite.rs b/lib/src/default_index/composite.rs index eda60436e..6aee0ad69 100644 --- a/lib/src/default_index/composite.rs +++ b/lib/src/default_index/composite.rs @@ -330,7 +330,11 @@ impl<'a> CompositeIndex<'a> { self.heads_pos(result) } - pub fn walk_revs(&self, wanted: &[IndexPosition], unwanted: &[IndexPosition]) -> RevWalk<'a> { + pub(super) fn walk_revs( + &self, + wanted: &[IndexPosition], + unwanted: &[IndexPosition], + ) -> RevWalk<'a> { let mut rev_walk = RevWalk::new(*self); rev_walk.extend_wanted(wanted.iter().copied()); rev_walk.extend_unwanted(unwanted.iter().copied()); diff --git a/lib/src/default_index/mod.rs b/lib/src/default_index/mod.rs index f52af70f4..5bb8610a1 100644 --- a/lib/src/default_index/mod.rs +++ b/lib/src/default_index/mod.rs @@ -27,9 +27,6 @@ pub use self::composite::{AsCompositeIndex, CompositeIndex, IndexLevelStats, Ind pub use self::entry::{IndexEntry, IndexPosition}; pub use self::mutable::DefaultMutableIndex; pub use self::readonly::{DefaultReadonlyIndex, ReadonlyIndexLoadError}; -pub use self::rev_walk::{ - RevWalk, RevWalkDescendants, RevWalkDescendantsGenerationRange, RevWalkGenerationRange, -}; pub use self::store::{DefaultIndexStore, DefaultIndexStoreError, DefaultIndexStoreInitError}; #[cfg(test)] diff --git a/lib/src/default_index/rev_walk.rs b/lib/src/default_index/rev_walk.rs index 79280af2c..f845ed4f9 100644 --- a/lib/src/default_index/rev_walk.rs +++ b/lib/src/default_index/rev_walk.rs @@ -200,7 +200,7 @@ impl RevWalkQueue { } #[derive(Clone)] -pub struct RevWalk<'a>(RevWalkImpl<'a, CompositeIndex<'a>>); +pub(super) struct RevWalk<'a>(RevWalkImpl<'a, CompositeIndex<'a>>); impl<'a> RevWalk<'a> { pub(super) fn new(index: CompositeIndex<'a>) -> Self { @@ -326,7 +326,7 @@ impl<'a, I: RevWalkIndex<'a>> RevWalkImpl<'a, I> { } #[derive(Clone)] -pub struct RevWalkGenerationRange<'a>(RevWalkGenerationRangeImpl<'a, CompositeIndex<'a>>); +pub(super) struct RevWalkGenerationRange<'a>(RevWalkGenerationRangeImpl<'a, CompositeIndex<'a>>); impl<'a> Iterator for RevWalkGenerationRange<'a> { type Item = IndexEntry<'a>; @@ -337,7 +337,7 @@ impl<'a> Iterator for RevWalkGenerationRange<'a> { } #[derive(Clone)] -pub struct RevWalkDescendantsGenerationRange<'a>( +pub(super) struct RevWalkDescendantsGenerationRange<'a>( RevWalkGenerationRangeImpl<'a, RevWalkDescendantsIndex<'a>>, ); @@ -465,7 +465,7 @@ impl RevWalkItemGenerationRange { /// Walks descendants from the roots, in order of ascending index position. #[derive(Clone)] -pub struct RevWalkDescendants<'a> { +pub(super) struct RevWalkDescendants<'a> { candidate_entries: Vec>, root_positions: HashSet, reachable_positions: HashSet,