diff --git a/Cargo.toml b/Cargo.toml index f4d59b6c..a2a1b256 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,6 @@ include = ["Cargo.toml", "LICENSE-MIT", "LICENSE-APACHE", "README.md", "src/**/* std = [] specialization = [] may_dangle = [] -extract_if = [] serde = ["dep:serde_core"] [dependencies] diff --git a/src/lib.rs b/src/lib.rs index e6bc8c73..012db3c3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,13 +30,6 @@ //! When this optional dependency is enabled, `SmallVec` implements the `serde::Serialize` and //! `serde::Deserialize` traits. //! -//! ### `extract_if` -//! -//! **This feature is unstable.** It may change to match the unstable `extract_if` method in libstd. -//! -//! Enables the `extract_if` method, which produces an iterator that calls a user-provided -//! closure to determine which elements of the vector to remove and yield from the iterator. -//! //! ### `specialization` //! //! **This feature is unstable and requires a nightly build of the Rust toolchain.** @@ -544,7 +537,6 @@ impl Drain<'_, T, N> { } } -#[cfg(feature = "extract_if")] /// An iterator which uses a closure to determine if an element should be removed. /// /// Returned from [`SmallVec::extract_if`][1]. @@ -567,7 +559,6 @@ where pred: F, } -#[cfg(feature = "extract_if")] impl core::fmt::Debug for ExtractIf<'_, T, N, F> where F: FnMut(&mut T) -> bool, @@ -580,7 +571,6 @@ where } } -#[cfg(feature = "extract_if")] impl Iterator for ExtractIf<'_, T, N, F> where F: FnMut(&mut T) -> bool, @@ -616,7 +606,6 @@ where } } -#[cfg(feature = "extract_if")] impl Drop for ExtractIf<'_, T, N, F> where F: FnMut(&mut T) -> bool, @@ -1120,7 +1109,6 @@ impl SmallVec { } } - #[cfg(feature = "extract_if")] /// Creates an iterator which uses a closure to determine if element in the range should be removed. /// /// If the closure returns true, then the element is removed and yielded. diff --git a/src/tests.rs b/src/tests.rs index 2082f962..e4b4cb62 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -929,7 +929,6 @@ fn test_clone_from() { assert_eq!(&*b, &[20, 21, 22]); } -#[cfg(feature = "extract_if")] #[test] fn test_extract_if() { let mut a: SmallVec = smallvec![0, 1u8, 2, 3, 4, 5, 6, 7, 8, 0];