Skip to content

Commit

Permalink
Fix get_counts already sorted check on lsb_sort
Browse files Browse the repository at this point in the history
  • Loading branch information
nessex committed Feb 2, 2024
1 parent c9ca8b6 commit 3aa7adb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sorts/lsb_sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ impl<'a> Sorter<'a> {
} else if let Some(next_counts) = next_counts {
next_counts
} else {
let (counts, already_sorted) = get_counts(bucket, level);
let (counts, already_sorted) = if invert {
get_counts(&tmp_bucket, level)
} else {
get_counts(bucket, level)
};

if already_sorted {
next_counts = None;
continue 'outer;
Expand Down

0 comments on commit 3aa7adb

Please sign in to comment.