Skip to content

Commit

Permalink
Fix rayon compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Westerlind committed Oct 2, 2020
1 parent 53ea0c2 commit dec2859
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/raw/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ impl<T> Bucket<T> {
self.as_ptr().copy_from_nonoverlapping(other.as_ptr(), 1);
}

fn cast<U>(self) -> Bucket<U> {
#[cfg_attr(feature = "inline-more", inline)]
fn cast<U>(&self) -> Bucket<U> {
Bucket {
ptr: self.ptr.cast(),
}
Expand Down Expand Up @@ -1612,12 +1613,17 @@ impl<T> RawIterRange<T> {

let tail = Self::new(
self.inner.next_ctrl.add(mid),
self.data.next_n(Group::WIDTH).next_n(mid),
self.inner.data.cast::<T>().next_n(Group::WIDTH).next_n(mid),
len - mid,
);
debug_assert_eq!(
self.data.next_n(Group::WIDTH).next_n(mid).ptr,
tail.data.ptr
self.inner
.data
.cast::<T>()
.next_n(Group::WIDTH)
.next_n(mid)
.ptr,
tail.inner.data.cast::<T>().ptr
);
debug_assert_eq!(self.inner.end, tail.inner.end);
self.inner.end = self.inner.next_ctrl.add(mid);
Expand Down

0 comments on commit dec2859

Please sign in to comment.