Skip to content

Commit

Permalink
Update cell.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle authored Dec 5, 2017
1 parent 28a19bf commit 19775f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ impl<T> RefCell<T> {
/// assert_eq!(cell, RefCell::new(6));
/// ```
#[inline]
#[stable(feature = "refcell_replace_swap", since="1.24.0")]
#[stable(feature = "refcell_replace", since="1.24.0")]
pub fn replace(&self, t: T) -> T {
mem::replace(&mut *self.borrow_mut(), t)
}
Expand All @@ -616,7 +616,7 @@ impl<T> RefCell<T> {
/// assert_eq!(cell, RefCell::new(6));
/// ```
#[inline]
#[unstable(feature = "refcell_replace_with", issue="43570")]
#[unstable(feature = "refcell_replace_swap", issue="43570")]
pub fn replace_with<F: FnOnce(&mut T) -> T>(&self, f: F) -> T {
let mut_borrow = &mut *self.borrow_mut();
let replacement = f(mut_borrow);
Expand All @@ -643,7 +643,7 @@ impl<T> RefCell<T> {
/// assert_eq!(d, RefCell::new(5));
/// ```
#[inline]
#[stable(feature = "refcell_replace_swap", since="1.24.0")]
#[stable(feature = "refcell_swap", since="1.24.0")]
pub fn swap(&self, other: &Self) {
mem::swap(&mut *self.borrow_mut(), &mut *other.borrow_mut())
}
Expand Down

0 comments on commit 19775f7

Please sign in to comment.