We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Option::filter
1 parent 06fa27d commit 5152a6fCopy full SHA for 5152a6f
src/libcore/option.rs
@@ -639,7 +639,7 @@ impl<T> Option<T> {
639
/// assert_eq!(Some(4).filter(is_even), Some(4));
640
/// ```
641
#[inline]
642
- #[unstable(feature = "option_filter", issue = "45860")]
+ #[stable(feature = "option_filter", since = "1.27.0")]
643
pub fn filter<P: FnOnce(&T) -> bool>(self, predicate: P) -> Self {
644
if let Some(x) = self {
645
if predicate(&x) {
0 commit comments