Skip to content

Commit

Permalink
code deduplication
Browse files Browse the repository at this point in the history
  • Loading branch information
crepererum committed Aug 18, 2016
1 parent fcc5585 commit 9e7ec50
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,7 @@ impl<T> RdxSort for [T] where T: RdxSortTemplate + Clone
buckets_b.push(Vec::with_capacity(presize));
}

for x in self.iter().cloned() {
let b = x.get_bucket(0);
assert!(b < cfg_nbuckets,
"Your RdxSortTemplate implementation returns a bucket >= cfg_nbuckets()!");
unsafe {
buckets_a.get_unchecked_mut(b).push(x);
}
}
helper_bucket(&mut buckets_a, self.iter().cloned(), cfg_nbuckets, 0);

for round in 1..cfg_nrounds {
for bucket in &mut buckets_b {
Expand Down

0 comments on commit 9e7ec50

Please sign in to comment.