Add is_some_with tracking issue number.
This commit is contained in:
parent
aaebae973f
commit
148234ff73
2 changed files with 3 additions and 3 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue