From dfddd7e5a864be2075c6ceb6e0887a2ddc31ca04 Mon Sep 17 00:00:00 2001 From: Daniel Sedlak Date: Thu, 6 Jun 2024 20:01:59 +0200 Subject: [PATCH] Stabilize Option::take_if --- core/src/option.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/option.rs b/core/src/option.rs index 9a527073602e6..e253cfd2822be 100644 --- a/core/src/option.rs +++ b/core/src/option.rs @@ -1708,8 +1708,6 @@ impl Option { /// # Examples /// /// ``` - /// #![feature(option_take_if)] - /// /// let mut x = Some(42); /// /// let prev = x.take_if(|v| if *v == 42 { @@ -1726,7 +1724,7 @@ impl Option { /// assert_eq!(prev, Some(43)); /// ``` #[inline] - #[unstable(feature = "option_take_if", issue = "98934")] + #[stable(feature = "option_take_if", since = "CURRENT_RUSTC_VERSION")] pub fn take_if

(&mut self, predicate: P) -> Option where P: FnOnce(&mut T) -> bool,