Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
[merge-sort] add limit option to take_arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
sundy-li committed Jul 30, 2021
1 parent 9ccaf93 commit 3268564
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compute/merge_sort/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub fn take_arrays<I: IntoIterator<Item = MergeSlice>>(
let limit = limit.min(len);
let mut growable = make_growable(arrays, false, limit);

if limit == len {
if limit != len {
let mut current_len = 0;
for (index, start, len) in slices {
if len + current_len >= limit {
Expand Down

0 comments on commit 3268564

Please sign in to comment.