Skip to content

Commit

Permalink
De-deprecate AtomicCell::get_mut
Browse files Browse the repository at this point in the history
PR crossbeam-rs#332 deprecated after the discussion of issue crossbeam-rs#315, but it is a
measure not yet necessary to take. Revert the deprecation and wait
for us to reach a consensus.
  • Loading branch information
jeehoonkang committed May 11, 2019
1 parent 6ac269b commit 3ba2c6f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crossbeam-utils/src/atomic/atomic_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,11 @@ impl<T: ?Sized> AtomicCell<T> {
///
/// assert_eq!(a.load(), 8);
/// ```
#[doc(hidden)]
#[deprecated(note = "this method is unsound and will be removed in the next release")]
///
/// # Caveat
///
/// This method might be unsound and removed in a future release, but we haven't decided
/// yet. See [#315](https://github.com/crossbeam-rs/crossbeam/issues/315) for more details.
pub fn get_mut(&mut self) -> &mut T {
unsafe { &mut *self.value.get() }
}
Expand Down

0 comments on commit 3ba2c6f

Please sign in to comment.