mirror of
https://github.com/openharmony/third_party_rust_tinyvec.git
synced 2026-07-19 14:23:33 -04:00
doc them nightly methods.
This commit is contained in:
@@ -138,6 +138,7 @@ impl<A: Array> ArrayVec<A> {
|
||||
self.truncate(0)
|
||||
}
|
||||
|
||||
/// De-duplicates the vec.
|
||||
#[cfg(feature = "nightly_slice_partition_dedup")]
|
||||
#[inline(always)]
|
||||
pub fn dedup(&mut self)
|
||||
@@ -147,6 +148,7 @@ impl<A: Array> ArrayVec<A> {
|
||||
self.dedup_by(|a, b| a == b)
|
||||
}
|
||||
|
||||
/// De-duplicates the vec according to the predicate given.
|
||||
#[cfg(feature = "nightly_slice_partition_dedup")]
|
||||
#[inline(always)]
|
||||
pub fn dedup_by<F>(&mut self, same_bucket: F)
|
||||
@@ -160,6 +162,7 @@ impl<A: Array> ArrayVec<A> {
|
||||
self.truncate(len);
|
||||
}
|
||||
|
||||
/// De-duplicates the vec according to the key selector given.
|
||||
#[cfg(feature = "nightly_slice_partition_dedup")]
|
||||
#[inline(always)]
|
||||
pub fn dedup_by_key<F, K>(&mut self, mut key: F)
|
||||
|
||||
+4
-1
@@ -182,7 +182,8 @@ impl<A: Array> TinyVec<A> {
|
||||
pub fn clear(&mut self) {
|
||||
self.truncate(0)
|
||||
}
|
||||
|
||||
|
||||
/// De-duplicates the vec.
|
||||
#[cfg(feature = "nightly_slice_partition_dedup")]
|
||||
#[inline(always)]
|
||||
pub fn dedup(&mut self)
|
||||
@@ -192,6 +193,7 @@ impl<A: Array> TinyVec<A> {
|
||||
self.dedup_by(|a, b| a == b)
|
||||
}
|
||||
|
||||
/// De-duplicates the vec according to the predicate given.
|
||||
#[cfg(feature = "nightly_slice_partition_dedup")]
|
||||
#[inline(always)]
|
||||
pub fn dedup_by<F>(&mut self, same_bucket: F)
|
||||
@@ -205,6 +207,7 @@ impl<A: Array> TinyVec<A> {
|
||||
self.truncate(len);
|
||||
}
|
||||
|
||||
/// De-duplicates the vec according to the key selector given.
|
||||
#[cfg(feature = "nightly_slice_partition_dedup")]
|
||||
#[inline(always)]
|
||||
pub fn dedup_by_key<F, K>(&mut self, mut key: F)
|
||||
|
||||
Reference in New Issue
Block a user