Add is_some_with tracking issue number.

This commit is contained in:
Mara Bos 2022-01-18 22:18:16 +01:00
parent aaebae973f
commit 148234ff73
2 changed files with 3 additions and 3 deletions

View File

@ -567,7 +567,7 @@ impl<T> Option<T> {
/// ```
#[must_use]
#[inline]
#[unstable(feature = "is_some_with", issue = "none")]
#[unstable(feature = "is_some_with", issue = "93050")]
pub fn is_some_with(&self, f: impl FnOnce(&T) -> bool) -> bool {
matches!(self, Some(x) if f(x))
}

View File

@ -558,7 +558,7 @@ impl<T, E> Result<T, E> {
/// ```
#[must_use]
#[inline]
#[unstable(feature = "is_some_with", issue = "none")]
#[unstable(feature = "is_some_with", issue = "93050")]
pub fn is_ok_with(&self, f: impl FnOnce(&T) -> bool) -> bool {
matches!(self, Ok(x) if f(x))
}
@ -600,7 +600,7 @@ impl<T, E> Result<T, E> {
/// ```
#[must_use]
#[inline]
#[unstable(feature = "is_some_with", issue = "none")]
#[unstable(feature = "is_some_with", issue = "93050")]
pub fn is_err_with(&self, f: impl FnOnce(&E) -> bool) -> bool {
matches!(self, Err(x) if f(x))
}