Skip to content

Commit dfddd7e

Browse files
committed
Stabilize Option::take_if
1 parent 29932f3 commit dfddd7e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

core/src/option.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1708,8 +1708,6 @@ impl<T> Option<T> {
17081708
/// # Examples
17091709
///
17101710
/// ```
1711-
/// #![feature(option_take_if)]
1712-
///
17131711
/// let mut x = Some(42);
17141712
///
17151713
/// let prev = x.take_if(|v| if *v == 42 {
@@ -1726,7 +1724,7 @@ impl<T> Option<T> {
17261724
/// assert_eq!(prev, Some(43));
17271725
/// ```
17281726
#[inline]
1729-
#[unstable(feature = "option_take_if", issue = "98934")]
1727+
#[stable(feature = "option_take_if", since = "CURRENT_RUSTC_VERSION")]
17301728
pub fn take_if<P>(&mut self, predicate: P) -> Option<T>
17311729
where
17321730
P: FnOnce(&mut T) -> bool,

0 commit comments

Comments
 (0)