Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit dd7ccb7

Browse files
authoredJun 7, 2024
Rollup merge of rust-lang#126089 - wutchzone:option_take_if, r=scottmcm
Stabilize Option::take_if Closes rust-lang#98934 ed: FCP complete in rust-lang#98934 (comment)
2 parents 199da77 + dfddd7e commit dd7ccb7

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)
Failed to load comments.