diff --git a/crossbeam-skiplist/src/base.rs b/crossbeam-skiplist/src/base.rs index d27c531b5..7d9bf5119 100644 --- a/crossbeam-skiplist/src/base.rs +++ b/crossbeam-skiplist/src/base.rs @@ -36,7 +36,7 @@ impl Index for Tower { fn index(&self, index: usize) -> &Atomic> { // This implementation is actually unsafe since we don't check if the // index is in-bounds. But this is fine since this is only used internally. - unsafe { self.pointers.get_unchecked(index) } + unsafe { &*(&self.pointers as *const Atomic>).add(index) } } }