Skip to content

Commit

Permalink
resolve build errors to make project compile
Browse files Browse the repository at this point in the history
  • Loading branch information
JOE1994 committed Nov 15, 2020
1 parent 16cc53d commit a6f4336
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions syncpool/src/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,12 @@ impl<T> RingBucket<T> {
/// make sure the bitmap is updated as well.
pub(crate) fn new(filler: Option<&ElemBuilder<T>>) -> Self {
// create the placeholder
let mut slice: [AtomicPtr<T>; SLOT_CAP] =
[AtomicPtr::new(ptr::null_mut()); SLOT_CAP];
let mut slice: [AtomicPtr<T>; SLOT_CAP] = Default::default();

// fill the slots and update the bitmap
if let Some(handle) = filler {
for (_, item) in slice.iter_mut().enumerate() {
item.swap(Box::into_raw(make_elem(handle), Ordering::SeqCst);
item.swap(Box::into_raw(make_elem(handle)), Ordering::SeqCst);
}
}

Expand Down

0 comments on commit a6f4336

Please # to comment.