From 463b595da999393d09f5ffceb15101d6d7176cc2 Mon Sep 17 00:00:00 2001 From: Lokathor Date: Mon, 13 Jan 2020 21:38:15 -0700 Subject: [PATCH] doc them nightly methods. --- src/arrayvec.rs | 3 +++ src/tinyvec.rs | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 9b39cb3..22701ee 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -138,6 +138,7 @@ impl ArrayVec { 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 ArrayVec { 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(&mut self, same_bucket: F) @@ -160,6 +162,7 @@ impl ArrayVec { 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(&mut self, mut key: F) diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 27ed2cf..4604b8a 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -182,7 +182,8 @@ impl TinyVec { 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 TinyVec { 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(&mut self, same_bucket: F) @@ -205,6 +207,7 @@ impl TinyVec { 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(&mut self, mut key: F)