Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdd7ccb7

Browse files
authored
Rollup merge ofrust-lang#126089 - wutchzone:option_take_if, r=scottmcm
Stabilize Option::take_ifClosesrust-lang#98934ed: FCP complete inrust-lang#98934 (comment)
2 parents199da77 +dfddd7e commitdd7ccb7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎core/src/option.rs‎

Lines changed: 1 addition & 3 deletions
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
pubfntake_if<P>(&mutself,predicate:P) ->Option<T>
17311729
where
17321730
P:FnOnce(&mutT) ->bool,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp