From 77f429fe00e2be1cd7c80009054d74e53230dabd Mon Sep 17 00:00:00 2001 From: sundy-li <543950155@qq.com> Date: Sun, 1 Aug 2021 11:51:02 +0800 Subject: [PATCH] Make merge_sort_slices MergeSortSlices public --- src/compute/merge_sort/mod.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/compute/merge_sort/mod.rs b/src/compute/merge_sort/mod.rs index 3dad0afdcb2..ab8d91f789d 100644 --- a/src/compute/merge_sort/mod.rs +++ b/src/compute/merge_sort/mod.rs @@ -234,7 +234,7 @@ fn recursive_merge_sort(slices: &[&[MergeSlice]], comparator: &Comparator) -> Ve // An iterator adapter that merge-sorts two iterators of `MergeSlice` into a single `MergeSlice` // such that the resulting `MergeSlice`s are ordered according to `comparator`. -struct MergeSortSlices<'a, L, R> +pub struct MergeSortSlices<'a, L, R> where L: Iterator, R: Iterator, @@ -426,7 +426,11 @@ where /// Given two iterators of slices representing two sets of sorted [`Array`]s, and a `comparator` bound to those [`Array`]s, /// returns a new iterator of slices denoting how to `take` slices from each of the arrays such that the resulting /// array is sorted according to `comparator` -fn merge_sort_slices<'a, L: Iterator, R: Iterator>( +pub fn merge_sort_slices< + 'a, + L: Iterator, + R: Iterator, +>( lhs: L, rhs: R, comparator: &'a Comparator, @@ -439,7 +443,7 @@ type Comparator<'a> = Box Ordering + 'a>; type IsValid<'a> = Box bool + 'a>; /// returns a comparison function between any two arrays of each pair of arrays, according to `SortOptions`. -fn build_comparator<'a>( +pub fn build_comparator<'a>( pairs: &'a [(&'a [&'a dyn Array], &SortOptions)], ) -> Result> { // prepare the comparison function of _values_ between all pairs of arrays