We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ce5e16 commit e9c2f0aCopy full SHA for e9c2f0a
src/lib.rs
@@ -1232,6 +1232,15 @@ impl<A: Array> SmallVec<A> {
1232
self.truncate(len - del);
1233
}
1234
1235
+ /// Retains only the elements specified by the predicate.
1236
+ ///
1237
+ /// This method is identical in behaviour to [`retain`]; it is included only
1238
+ /// to maintain api-compatability with `std::Vec`, where the methods are
1239
+ /// separate for historical reasons.
1240
+ pub fn retain_mut<F: FnMut(&mut A::Item) -> bool>(&mut self, f: F) {
1241
+ self.retain(f)
1242
+ }
1243
+
1244
/// Removes consecutive duplicate elements.
1245
pub fn dedup(&mut self)
1246
where
0 commit comments