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 5, 2020
1 parent 763b384 commit d556b53
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/raw/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ impl<T> Bucket<T> {
self.as_ptr().copy_from_nonoverlapping(other.as_ptr(), 1);
}

#[cfg_attr(feature = "inline-more", inline)]
fn cast<U>(self) -> Bucket<U> {
Bucket {
ptr: self.ptr.cast(),
Expand Down Expand Up @@ -1612,12 +1613,23 @@ 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
.clone()
.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
.clone()
.cast::<T>()
.next_n(Group::WIDTH)
.next_n(mid)
.ptr,
tail.inner.data.clone().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 d556b53

Please sign in to comment.