Skip to content

Commit 7db2677

Browse files
committed
Change feature name to is_some_and
1 parent e29eb22 commit 7db2677

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

core/src/option.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ impl<T> Option<T> {
559559
/// # Examples
560560
///
561561
/// ```
562-
/// #![feature(is_some_with)]
562+
/// #![feature(is_some_and)]
563563
///
564564
/// let x: Option<u32> = Some(2);
565565
/// assert_eq!(x.is_some_and(|x| x > 1), true);
@@ -572,7 +572,7 @@ impl<T> Option<T> {
572572
/// ```
573573
#[must_use]
574574
#[inline]
575-
#[unstable(feature = "is_some_with", issue = "93050")]
575+
#[unstable(feature = "is_some_and", issue = "93050")]
576576
pub fn is_some_and(self, f: impl FnOnce(T) -> bool) -> bool {
577577
match self {
578578
None => false,

core/src/result.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ impl<T, E> Result<T, E> {
548548
/// # Examples
549549
///
550550
/// ```
551-
/// #![feature(is_some_with)]
551+
/// #![feature(is_some_and)]
552552
///
553553
/// let x: Result<u32, &str> = Ok(2);
554554
/// assert_eq!(x.is_ok_and(|x| x > 1), true);
@@ -561,7 +561,7 @@ impl<T, E> Result<T, E> {
561561
/// ```
562562
#[must_use]
563563
#[inline]
564-
#[unstable(feature = "is_some_with", issue = "93050")]
564+
#[unstable(feature = "is_some_and", issue = "93050")]
565565
pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool {
566566
match self {
567567
Err(_) => false,
@@ -595,7 +595,7 @@ impl<T, E> Result<T, E> {
595595
/// # Examples
596596
///
597597
/// ```
598-
/// #![feature(is_some_with)]
598+
/// #![feature(is_some_and)]
599599
/// use std::io::{Error, ErrorKind};
600600
///
601601
/// let x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, "!"));
@@ -609,7 +609,7 @@ impl<T, E> Result<T, E> {
609609
/// ```
610610
#[must_use]
611611
#[inline]
612-
#[unstable(feature = "is_some_with", issue = "93050")]
612+
#[unstable(feature = "is_some_and", issue = "93050")]
613613
pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool {
614614
match self {
615615
Ok(_) => false,

std/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@
291291
#![feature(hasher_prefixfree_extras)]
292292
#![feature(hashmap_internals)]
293293
#![feature(int_error_internals)]
294-
#![feature(is_some_with)]
294+
#![feature(is_some_and)]
295295
#![feature(maybe_uninit_slice)]
296296
#![feature(maybe_uninit_write_slice)]
297297
#![feature(nonnull_slice_from_raw_parts)]

0 commit comments

Comments
 (0)