From 4f12de0660bb26eefac258b03ffb6c43d2debda7 Mon Sep 17 00:00:00 2001 From: Cameron Steffen Date: Thu, 23 Jun 2022 13:17:42 -0500 Subject: Change feature name to is_some_and --- library/core/src/option.rs | 4 ++-- library/core/src/result.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'library/core/src') diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 0623d304004..4b57371096e 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -559,7 +559,7 @@ impl Option { /// # Examples /// /// ``` - /// #![feature(is_some_with)] + /// #![feature(is_some_and)] /// /// let x: Option = Some(2); /// assert_eq!(x.is_some_and(|x| x > 1), true); @@ -572,7 +572,7 @@ impl Option { /// ``` #[must_use] #[inline] - #[unstable(feature = "is_some_with", issue = "93050")] + #[unstable(feature = "is_some_and", issue = "93050")] pub fn is_some_and(self, f: impl FnOnce(T) -> bool) -> bool { match self { None => false, diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 7c740bbd01f..1c6d4cc5279 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -548,7 +548,7 @@ impl Result { /// # Examples /// /// ``` - /// #![feature(is_some_with)] + /// #![feature(is_some_and)] /// /// let x: Result = Ok(2); /// assert_eq!(x.is_ok_and(|x| x > 1), true); @@ -561,7 +561,7 @@ impl Result { /// ``` #[must_use] #[inline] - #[unstable(feature = "is_some_with", issue = "93050")] + #[unstable(feature = "is_some_and", issue = "93050")] pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool { match self { Err(_) => false, @@ -595,7 +595,7 @@ impl Result { /// # Examples /// /// ``` - /// #![feature(is_some_with)] + /// #![feature(is_some_and)] /// use std::io::{Error, ErrorKind}; /// /// let x: Result = Err(Error::new(ErrorKind::NotFound, "!")); @@ -609,7 +609,7 @@ impl Result { /// ``` #[must_use] #[inline] - #[unstable(feature = "is_some_with", issue = "93050")] + #[unstable(feature = "is_some_and", issue = "93050")] pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool { match self { Ok(_) => false, -- cgit 1.4.1-3-g733a5